Commit f0fbb2b3 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

objects: Send a vlc_object_kill from vlc_object_destroy() to make sure...

objects: Send a vlc_object_kill from vlc_object_destroy() to make sure vlc_object_release() can properly free all the allocated resources when the refcount reach zero.

Previously you need to send a vlc_object_kill() prior to a vlc_object_release() to get your object actually destroyed, which rendered the refcounting unusuable in some cases.
parent 78e39f0d
...@@ -415,6 +415,10 @@ static void vlc_object_destroy( vlc_object_t *p_this ) ...@@ -415,6 +415,10 @@ static void vlc_object_destroy( vlc_object_t *p_this )
abort(); abort();
} }
/* Send a kill to the object's thread if applicable */
vlc_object_kill( p_this );
/* Call the custom "subclass" destructor */ /* Call the custom "subclass" destructor */
if( p_priv->pf_destructor ) if( p_priv->pf_destructor )
p_priv->pf_destructor( p_this ); p_priv->pf_destructor( p_this );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment