* Floating references are C-convenience only
* Languages can and should sink floating references when they
first touch them.
* Any interface or code in libraries that create problems with
this are buggy.
This has been the view from day 1, and I think you'll create
considerably bigger problems trying to futz around with it and treat
floating references specially in a binding than you have now.
The only thing I can see at the GTK+ level would be to add a
make_tool_item replacement vfunc and use that instead if non-null.
There's a workaround at the application level, which is something like:
def do_create_tool_item(self):
button = Gtk.MenuToolButton()
self.buttons.append(button)
button.connect('destroy', self.remove_from_buttons)
return button
we can document this bug in the gtk-doc and suggest the workaround
there. But I'd strongly suggest *not* doing wholesale changes to the
Python memory management based on this bug.
> def on_view_label_cell_editing_started(renderer, editable, path):This one is is simple. GTK+ needs to sink the arg before calling the
>
> print path
> renderer = Gtk.CellRendererText()
> renderer.connect('editing-started',
> on_view_label_cell_editing_started)
function. There should be no compatibility problems. The pygi patch on
the bug appears simply wrong and probably is creating the leak you
noticed.