diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index 37fb8cd9..37ba919d 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -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(); } diff --git a/tools/vips.c b/tools/vips.c index e506fae0..6f79dab8 100644 --- a/tools/vips.c +++ b/tools/vips.c @@ -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;