GNOME Bugzilla – Bug 749660
Cannot disconnect signal handlers during a weak ref's notify
Last modified: 2015-05-21 14:42:08 UTC
This causes a warning to be printed. Discovered while writing a test for Builder's EggStateMachine.
Created attachment 303723 [details] [review] Destroy GObject weak refs before signal handlers This was done after fixing Bug 749659 and as such it is required before this.
Nice. This is really useful so we don't have to guess about the state of the signal handler. It simplifies our code into "if (handler_id != 0)" since the weak ref will allow us to remove them first.
Again... "where_object_was" is called that for a reason. This is no longer a valid GObject. See the docs: """ Since the object is already being finalized 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. """ *** This bug has been marked as a duplicate of bug 745678 ***