Re: Memory problems with gdk_pixbuf



Dnia 06-06-2005, pon o godzinie 21:11 -0300, John Coppens napisał:
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.

This is correct. Back in GGAD days, it would actually release the
object, however in GObject 2.0 things were changed, and destroy no
longer releases the object, merely calls its destructor. So if you have
any outstanding references, you need to unref them separately for object
to get freed.

Cheers,
Maciej

-- 
Maciej Katafiasz <ml mathrick org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]