WeakRef.init

Initialise a non-statically-allocated GWeakRef. This function also calls g_weak_ref_set() with object on the freshly-initialised weak reference. This function should always be matched with a call to g_weak_ref_clear(). It is not necessary to use this function for a GWeakRef in static storage because it will already be properly initialised. Just use g_weak_ref_set() directly. Since 2.32

class WeakRef
void
init
(
void* object
)

Parameters

object void*

a GObject or NULL. [allow-none]

Meta