mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
381d35fd1e
commit
7522e2ccf8
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue