- /* We have no children */
- assert (internals->i_children == 0);
- parent = p_this->p_parent;
-
-#ifndef NDEBUG
- if( VLC_OBJECT(p_this->p_libvlc) == p_this )
- {
- /* Test for leaks */
- vlc_object_t *leaked = internals->next;
- while( leaked != p_this )
- {
- /* We are leaking this object */
- fprintf( stderr,
- "ERROR: leaking object (%p, type:%s, name:%s)\n",
- leaked, leaked->psz_object_type,
- leaked->psz_object_name );
- /* Dump object to ease debugging */
- vlc_object_dump( leaked );
- fflush(stderr);
- leaked = vlc_internals (leaked)->next;
- }
-
- if( internals->next != p_this )
- /* Dump libvlc object to ease debugging */
- vlc_object_dump( p_this );
- }
-#endif
- /* Remove the object from object list
- * so that it cannot be encountered by vlc_object_get() */
- vlc_internals (internals->next)->prev = internals->prev;
- vlc_internals (internals->prev)->next = internals->next;
-
- if (parent)