better leak checl output
This commit is contained in:
parent
ac2fb4a823
commit
ebc0e54217
13
TODO
13
TODO
|
@ -4,6 +4,19 @@
|
||||||
GLib-GObject-WARNING **: invalid cast from `VipsFormatVips' to
|
GLib-GObject-WARNING **: invalid cast from `VipsFormatVips' to
|
||||||
`VipsOperation'
|
`VipsOperation'
|
||||||
|
|
||||||
|
if( !(type = vips_type_find( "VipsOperation", "vips" )) )
|
||||||
|
return( NULL );
|
||||||
|
|
||||||
|
is finding VipsFormatVips
|
||||||
|
|
||||||
|
though VipsFormatVips is not a subclass of VipsOperation ?!?!?
|
||||||
|
|
||||||
|
vips_type_find() was always searching the whole of VipsObject and ignoring
|
||||||
|
basename
|
||||||
|
|
||||||
|
changed it back, but what will this break? there was a reason we got rid of
|
||||||
|
subclass searching I forget what
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -303,16 +303,15 @@ vips_shutdown( void )
|
||||||
|
|
||||||
vips_object_print_all();
|
vips_object_print_all();
|
||||||
|
|
||||||
vips_buf_appendf( &buf,
|
vips_buf_appendf( &buf, "memory: %d allocations, %zd bytes\n",
|
||||||
"tracked memory: %d allocations totalling %zd bytes\n",
|
|
||||||
vips_tracked_get_allocs(),
|
vips_tracked_get_allocs(),
|
||||||
vips_tracked_get_mem() );
|
vips_tracked_get_mem() );
|
||||||
vips_buf_appendf( &buf, "tracked memory: high-water mark " );
|
vips_buf_appendf( &buf, "memory: high-water mark " );
|
||||||
vips_buf_append_size( &buf, vips_tracked_get_mem_highwater() );
|
vips_buf_append_size( &buf, vips_tracked_get_mem_highwater() );
|
||||||
vips_buf_appendf( &buf, "\ntracked files: %d open\n",
|
vips_buf_appendf( &buf, "\nfiles: %d open\n",
|
||||||
vips_tracked_get_files() );
|
vips_tracked_get_files() );
|
||||||
|
|
||||||
printf( "%s", vips_buf_all( &buf ) );
|
fprintf( stderr, "%s", vips_buf_all( &buf ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1757,7 +1757,7 @@ vips_type_find( const char *basename, const char *nickname )
|
||||||
{
|
{
|
||||||
VipsObjectClass *class;
|
VipsObjectClass *class;
|
||||||
|
|
||||||
if( !(class = vips_class_find( "VipsObject", nickname )) )
|
if( !(class = vips_class_find( basename, nickname )) )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
|
||||||
return( G_OBJECT_CLASS_TYPE( class ) );
|
return( G_OBJECT_CLASS_TYPE( class ) );
|
||||||
|
@ -1839,10 +1839,18 @@ vips_object_local_array( VipsObject *parent, int n )
|
||||||
static void *
|
static void *
|
||||||
vips_object_print_all_cb( VipsObject *object, int *n )
|
vips_object_print_all_cb( VipsObject *object, int *n )
|
||||||
{
|
{
|
||||||
printf( "%d) ", *n );
|
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object );
|
||||||
vips_object_print_name( object );
|
|
||||||
printf( "\n" );
|
char str[32768];
|
||||||
vips_object_print( object );
|
VipsBuf buf = VIPS_BUF_STATIC( str );
|
||||||
|
|
||||||
|
fprintf( stderr, "%d) %s (%p)\n",
|
||||||
|
*n, G_OBJECT_TYPE_NAME( object ), object );
|
||||||
|
|
||||||
|
class->print_class( class, &buf );
|
||||||
|
vips_buf_appendf( &buf, "\n" );
|
||||||
|
class->print( object, &buf );
|
||||||
|
fprintf( stderr, "%s\n", vips_buf_all( &buf ) );
|
||||||
|
|
||||||
*n += 1;
|
*n += 1;
|
||||||
|
|
||||||
|
@ -1856,7 +1864,7 @@ vips_object_print_all( void )
|
||||||
g_hash_table_size( vips__object_all ) > 0 ) {
|
g_hash_table_size( vips__object_all ) > 0 ) {
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
printf( "%d objects alive:\n",
|
fprintf( stderr, "%d objects alive:\n",
|
||||||
g_hash_table_size( vips__object_all ) );
|
g_hash_table_size( vips__object_all ) );
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
|
|
Loading…
Reference in New Issue