only pront a leak message if there's a leak
This commit is contained in:
parent
a31c7d8caf
commit
c5c2cf5f2b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user