Re: Problems with un-owned objects passed to closures in pygobject (gtk_cell_renderer_text_start_editing)
- From: Simon Feltman <s feltman gmail com>
- To: Torsten Schoenfeld <kaffeetisch gmx de>
- Cc: gtk-devel-list gnome org
- Subject: Re: Problems with un-owned objects passed to closures in pygobject (gtk_cell_renderer_text_start_editing)
- Date: Mon, 4 Feb 2013 19:08:32 -0800
I could easily be misunderstanding the internals, but at some point isn't a call to something like gtk_widget_set_parent on the children needed for widgets to ever be displayed or useful? (which sinks the children)
If it really might be a problem we could work around the leak by tracking if the instance was created within python and if the instance has ever been marshaled to C. At which point we could rely on the GC cleanup of the wrapper to sink and unref the extra ref in cases the GObject was never passed on to C at any point. This sucks but it seems a little better than checking GObject ref counts during marshaling and floating sunk objects based on if it was initially floating and the GObject ref count is only 1, which might be unsafe.
-Simon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]