Method

GObjectClosureinvalidate

Declaration [src]

void
g_closure_invalidate (
  GClosure* closure
)

Description [src]

Sets a flag on the closure to indicate that its calling environment has become invalid, and thus causes any future invocations of g_closure_invoke() on this closure to be ignored.

Also, invalidation notifiers installed on the closure will be called at this point. Note that unless you are holding a reference to the closure yourself, the invalidation notifiers may unref the closure and cause it to be destroyed, so if you need to access the closure after calling g_closure_invalidate(), make sure that you’ve previously called g_closure_ref().

Note that g_closure_invalidate() will also be called when the reference count of a closure drops to zero (unless it has already been invalidated before).