GNOME Bugzilla – Bug 640184
gobject.new-created objects never get finalized
Last modified: 2011-01-26 20:47:46 UTC
When you create a python subclass for a gobject-based type (like a new GtkButton subclass) and instantiate it through gobject.new(MyNewButton), it will never get finalized because one python reference is leaked. If the same object is created through MyNewButton(), then everything works as expected.
Created attachment 178943 [details] [review] Add failing tests for the number of python refs at creation time
Created attachment 178977 [details] [review] Add some tests for the number of python refs held at creation time
Created attachment 178978 [details] [review] Fix leaked python reference in python-defined subclasses
Created attachment 179180 [details] [review] Fix leaked python reference in python-defined subclasses After running the test suite again it looks like nothing actually breaks.
Attachment 178977 [details] pushed as a59e2d5 - Add some tests for the number of python refs held at creation time Attachment 179180 [details] pushed as 975341a - Fix leaked python reference in python-defined subclasses