Re: Memory problems with gdk_pixbuf
- From: John Coppens <john jcoppens com>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Memory problems with gdk_pixbuf
- Date: Mon, 6 Jun 2005 21:11:02 -0300
On Mon, 06 Jun 2005 14:34:59 -0400
Tristan Van Berkom <tvb gnome org> wrote:
img_item = gnome_canvas_item_new(root,
gnome_canvas_pixbuf_get_type(),
"pixbuf", pxb,
"x", 0.0, "y", 0.0,
"width", pxb_w, "height", pxb_h,
NULL);
gdk_pixbuf_unref(pxb);
You could try:
(gdb) watch ((GObject *)pxb)->ref_count
Thanks Tristan.
Apparently, inside gnome_canvas_item_new, the ref_count gets incremented
three times (to 4), and decremented again to 2, which is fine. The unref
decrements again to 1, which is also correct.
The sentence:
gtk_object_destroy(GTK_OBJECT(img_item));
Does not destroy the pxb item - the ref_count is not changed to 0... I
scanned over the gnomecanvas.c code, but I cannot find any code for
unreferencing the pixbuf... But then I'm not a great programmer and not
faniliar with the gnome insides.
Should I report this as a bug?
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]