debug_ref_unref_push_backtrace_for_object


Description:


[ Version ( since = "3.20" ) ]
public void debug_ref_unref_push_backtrace_for_object (void* _object)

Gets current backtrace of this call and adds it to the list of backtraces with 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).

Parameters:

_object

a Object, for which add the backtrace


Namespace: Camel
Package: camel-1.2