Function
Cameldebug_ref_unref_push_backtrace_for_object
since: 3.20
Declaration [src]
void
camel_debug_ref_unref_push_backtrace_for_object (
gpointer _object
)
Description [src]
Gets current backtrace of this call and adds it to the list of backtraces with camel_debug_ref_unref_push_backtrace().
Usual usage would be, once GNOME bug 758358 is applied to the GLib sources,
or a patched GLib is used, to call this function in an object init()
function,
like this:
static void my_object_init (MyObject *obj) { camel_debug_ref_unref_push_backtrace_for_object (obj); g_track_object_ref_unref (obj, (GFunc) camel_debug_ref_unref_push_backtrace_for_object, NULL); }
Note that the g_track_object_ref_unref()
can track only one pointer, thus make
sure you track the right one (add some logic if multiple objects are created at once).
Available since: 3.20