A #GWeakNotify function can be added to an object as a callback that gets
triggered when the object is finalized.
Since the object is already being disposed when the #GWeakNotify is called,
there's not much you could do with the object, apart from e.g. using its
address as hash-index or the like.
A #GWeakNotify function can be added to an object as a callback that gets triggered when the object is finalized.
Since the object is already being disposed when the #GWeakNotify is called, there's not much you could do with the object, apart from e.g. using its address as hash-index or the like.
In particular, this means it’s invalid to call gobject.object.ObjectG.ref_, gobject.weak_ref.WeakRef.init_, gobject.weak_ref.WeakRef.set, gobject.object.ObjectG.addToggleRef, gobject.object.ObjectG.weakRef, gobject.object.ObjectG.addWeakPointer or any function which calls them on the object from this callback.