From: Rafaël Carré Date: Mon, 31 Mar 2008 20:26:56 +0000 (+0200) Subject: Assert that we don't leak input items X-Git-Tag: 0.9.0-test0~1646 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=fdf1b8af4e8cd13f7c33a5994a7301b9ab7e9d4c;p=vlc Assert that we don't leak input items --- diff --git a/src/libvlc-common.c b/src/libvlc-common.c index 2b981f5df9..7a29a70c4e 100644 --- a/src/libvlc-common.c +++ b/src/libvlc-common.c @@ -993,11 +993,12 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) announce_HandlerDestroy( p_announce ); } - msg_Dbg( p_libvlc, "removing remaining input items" ); + vlc_bool_t b_clean = VLC_TRUE; FOREACH_ARRAY( input_item_t *p_del, p_libvlc->input_items ) - msg_Dbg( p_libvlc, "WARNING: %p input item has not been deleted properly", p_del ); - /* Don't do anything, faulting code should be fixed */ + msg_Err( p_libvlc, "input item %p has not been deleted properly: refcount %d", p_del, p_del->i_gc_refcount ); + b_clean = VLC_FALSE; FOREACH_END(); + assert( b_clean ); ARRAY_RESET( p_libvlc->input_items ); msg_Dbg( p_libvlc, "removing stats" );