only pront a leak message if there's a leak

This commit is contained in:
John Cupitt 2011-11-14 08:51:09 +00:00
parent a31c7d8caf
commit c5c2cf5f2b

View File

@ -295,6 +295,10 @@ vips_leak( void )
vips_object_print_all();
if( vips_tracked_get_allocs() ||
vips_tracked_get_mem() ||
vips_tracked_get_mem_highwater() ||
vips_tracked_get_files() ) {
vips_buf_appendf( &buf, "memory: %d allocations, %zd bytes\n",
vips_tracked_get_allocs(), vips_tracked_get_mem() );
vips_buf_appendf( &buf, "memory: high-water mark " );
@ -304,6 +308,7 @@ vips_leak( void )
fprintf( stderr, "%s", vips_buf_all( &buf ) );
}
}
/**
* vips_shutdown: