Re: Re: Gtk2::ImageView memory issue
- From: jeffrey ratcliffe gmail com
- To: Torsten Schoenfeld <kaffeetisch gmx de>, gtk-perl-list gnome org
- Subject: Re: Re: Gtk2::ImageView memory issue
- Date: Fri, 06 Mar 2009 09:29:22 +0000
> I wonder if the return for gtk_image_tool_selector_new() in the .xs
> should be SVGtkIImageTool_noinc, if that func gives you a ref to take
> over. Seems to make it work for me ...
Fixed it for me too. Thanks for the patch. I'll get a new release out.
> Yes. Constructors and other functions returning new instances of direct GObject descendants need to use the _noinc typemaps to assume ownership. This is not necessary for GtkObject descendants.
The same applies to Gtk2::ImageView::Tool::Dragger and Gtk2::ImageView::Tool::Painter.
Presumably this is also the case for Glib::Boxed (Gtk2::Gdk::Pixbuf::Draw::Cache), although as the library supplies gdk_pixbuf_draw_cache_free, I should create a DESTROY method which calls this instead.
Regards
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]