more leak tweaks

fewer noisy messages, more checking
This commit is contained in:
John Cupitt 2011-09-24 10:59:31 +01:00
parent 0f46696f16
commit 1374b47e0f
2 changed files with 6 additions and 8 deletions

View File

@ -294,6 +294,12 @@ vips_shutdown( void )
if( vips__leak )
vips_object_print_all();
/* In dev releases, always show leaks.
*/
#ifdef DEBUG_LEAK
vips_object_print_all();
#endif /*DEBUG_LEAK*/
im_close_plugins();
}

View File

@ -65,13 +65,11 @@
/*
#define DEBUG_FATAL
#define DEBUG_LEAK
#define DEBUG
*/
/* Need to disable these sometimes.
#undef DEBUG_FATAL
#undef DEBUG_LEAK
*/
#ifdef HAVE_CONFIG_H
@ -1014,14 +1012,8 @@ main( int argc, char **argv )
G_LOG_LEVEL_ERROR |
G_LOG_LEVEL_CRITICAL |
G_LOG_LEVEL_WARNING );
fprintf( stderr, "*** DEBUG_FATAL: will abort() on first warning\n" );
#endif /*!DEBUG_FATAL*/
#ifdef DEBUG_LEAK
fprintf( stderr, "*** DEBUG_LEAK: will leak test on exit\n" );
#endif /*!DEBUG_LEAK*/
/* Try to find our action.
*/
action = NULL;