Can help checking if the number of alive objects is growing over time or stays stable.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2245>
{
GList *leaks, *l;
gboolean ret = FALSE;
+ guint n = 0;
if (!ret_leaks)
GST_TRACE_OBJECT (self, "start listing currently alive objects");
goto done;
}
- for (l = leaks; l; l = l->next)
+ for (l = leaks; l; l = l->next) {
process_leak (l->data, ret_leaks);
+ n++;
+ }
g_list_free_full (leaks, (GDestroyNotify) leak_free);
done:
if (!ret_leaks)
- GST_TRACE_OBJECT (self, "done listing currently alive objects");
+ GST_TRACE_OBJECT (self, "listed %u alive objects", n);
return ret;
}