ObjectGtk.weakref

Warning gtk_object_weakref is deprecated and should not be used in newly-written code. Use g_object_weak_ref() instead. Adds a weak reference callback to an object. Weak references are used for notification when an object is finalized. They are called "weak references" because they allow you to safely hold a pointer to an object without calling g_object_ref() (g_object_ref() adds a strong reference, that is, forces the object to stay alive).

class ObjectGtk
void
weakref

Parameters

notify GDestroyNotify

callback to invoke before the object is freed.

data void*

extra data to pass to notify.

Meta