]> git.sesse.net Git - vlc/commitdiff
objects: Send a vlc_object_kill from vlc_object_destroy() to make sure vlc_object_rel...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 22 Mar 2008 23:51:03 +0000 (00:51 +0100)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 22 Mar 2008 23:51:03 +0000 (00:51 +0100)
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.

src/misc/objects.c

index fa1bfe0281de61636a56c45be9231fa165c2b218..5e68e8959713993ea4a63c1e3c4846be667bd63b 100644 (file)
@@ -415,6 +415,10 @@ static void vlc_object_destroy( vlc_object_t *p_this )
         abort();
     }
 
+
+    /* Send a kill to the object's thread if applicable */
+    vlc_object_kill( p_this );
+
     /* Call the custom "subclass" destructor */
     if( p_priv->pf_destructor )
         p_priv->pf_destructor( p_this );