CClosure.newObjectSwap

A variant of g_cclosure_new_swap() which uses object as user_data and calls g_object_watch_closure() on object and the created closure. This function is useful when you have a callback closely associated with a GObject, and want the callback to no longer run after the object is is freed.

class CClosure
static
newObjectSwap

Parameters

callbackFunc GCallback

the function to invoke

object ObjectG

a GObject pointer to pass to callback_func

Return Value

Type: Closure

a new GCClosure

Meta