GNOME Bugzilla – Bug 759249
GObject.disconnect_by_func only disconnect one instance of the signal connection
Last modified: 2018-01-10 20:52:05 UTC
Created attachment 317038 [details] Test case showing the issue. The g_signal_handlers_disconnect_by_func states: Disconnects all handlers on an instance that match func and data . But the attached code sample shows that it only disconnects one handler in pygobject.
It looks like the Python implementation just finds the first instance and disconnects it [1] & [2]. Unfortunately it also looks like this method might be leaking a reference to the Python function and the C level closure itself since I don't see a call to g_closure_invalidate(), apart from object destruction [3]. [1] https://git.gnome.org/browse/pygobject/tree/gi/pygobject.c?h=3.19.2#n2008 [2] https://git.gnome.org/browse/pygobject/tree/gi/pygtype.c?h=3.19.2#n940 [3] https://git.gnome.org/browse/pygobject/tree/gi/pygobject.c?h=3.19.2#n103
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/106.