summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-24 13:44:48 (GMT)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-24 13:44:48 (GMT)
commitad2a8f07b35d2bc8cad23d955320937ca4ef0195 (patch)
treeafb326e834f2168d76b57540ecff2f2acf805195
parent68e9157d145f4e02f522523df079ce9118d33e16 (diff)
downloadgobject-list-master.tar.gz
gobject-list-master.tar.xz
Display the number of objectsHEADmaster
This is useful when testing a leak fixes to check if we actually reduced the number of leaked objects.
-rw-r--r--gobject-list.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gobject-list.c b/gobject-list.c
index 6fcf5c7..cc5de5a 100644
--- a/gobject-list.c
+++ b/gobject-list.c
@@ -168,6 +168,7 @@ _dump_object_list (GHashTable *hash)
g_print (" - %p, %s: %u refs\n",
obj, G_OBJECT_TYPE_NAME (obj), obj->ref_count);
}
+ g_print ("%u objects\n", g_hash_table_size (hash));
#endif
}
@@ -194,6 +195,7 @@ _sig_usr2_handler (int signal)
{
g_print (" - %p, %s\n", obj, (gchar *) type);
}
+ g_print ("%u objects\n", g_hash_table_size (removed));
g_hash_table_remove_all (added);
g_hash_table_remove_all (removed);