Re: [gtkmm] unreferencing Glib::RefPtr
- From: Enrico Costanza <ec142 york ac uk>
- To: Murray Cumming Comneon com
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] unreferencing Glib::RefPtr
- Date: Fri, 25 Apr 2003 00:13:03 +0200
Murray Cumming Comneon com wrote:
This
http://cvs.gnome.org/lxr/source/gtkmm-root/gtk-src/image.hg#83
probably needs the extra refreturn parameter. It would be great if you could
test than and submit a patch if it fixes the problem.
Yes, it works now. Thanks!
I have just added ", refreturn" to the _METHOD_WRAP for get_pixbuf.
How do I submit a patch? Shall I upload with cvs? (how?)
Just for curiosity sake, where is _METHOD_WRAP defined? (I have no idea
about autoconf/automake..)
Thanks again,
Enrico
Murray Cumming
murrayc usa net
www.murrayc.com
-----Original Message-----
From: Enrico Costanza [mailto:ec142 york ac uk]
Sent: Donnerstag, 24. April 2003 09:41
To: gtkmm-list gnome org
Subject: [gtkmm] unreferencing Glib::RefPtr
Dear all,
I am trying to create a Gtk::Image from a Gdk::Pixbuf and then update
the same pixbuf. i.e.:
Gdk::Pixbuf *pixbuf;
Gtk::Image *image;
pixbuf = Gdk::Pixbuf::create_from_file("1.png");
image = manage( new Gtk::Image(pixbuf) );
pixbuf = image->get_pixbuf();
but I get:
(test:1769): GLib-GObject-CRITICAL **: file gobject.c: line 1337
(g_object_unref): assertion `G_IS_OBJECT (object)' failed
If I create the image from a copy of the pixbuf (using
pixbuf->copy in
the image constructor), I get the same.
Am I misusing the RefPtr, or is this a bug?
Thanks in advance,
Enrico Costanza
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]