trace: include type name in leaked objects

When we are dealing with a GObject, print the type name along with
the pointer for easier debugging.
This commit is contained in:
Wim Taymans 2009-12-23 21:37:51 +01:00 committed by Wim Taymans
parent 381d35fd1e
commit 7522e2ccf8

View file

@ -471,7 +471,13 @@ gst_alloc_trace_print (const GstAllocTrace * trace)
mem_live = trace->mem_live;
while (mem_live) {
g_print ("%-22.22s : %p\n", "", mem_live->data);
gpointer data = mem_live->data;
if (G_IS_OBJECT (data)) {
g_print ("%-22.22s : %p\n", g_type_name (G_OBJECT_TYPE (data)), data);
} else {
g_print ("%-22.22s : %p\n", "", data);
}
mem_live = mem_live->next;
}
}