Re: GtkImage simple question, please help

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

 



On Sun, Jun 25, 2006 at 11:15:12AM +0200, hm wrote:
> 
> * if i`ll call gtk_image_clear (image) .. will it dispose memory reserved for image pointed by 'image1', or it will just clear pixbuf/bitmap ? 

gtk_image_clear() clears the image, therefore the image
releases the reference the image holds to the displayed
pixbuf (or other objects).  But the image will still
*exist*, it will be just empty.

> * if answer for previous question is no, it will not dispose the memory, then how it is possible to change image inside button ?

By setting another image.

The button then releases the reference it holds to the old
image -- and in the described scenario nothing else holds
a reference to it, therefore it will be finalized.

Please read the refcounting parts in GObject API docs and
GObject tutorial -- and of GtkObject too as although the
methods are superseded by GObject methods the intro is more
comprehensible (IMO).

Yeti


--
Anonyms eat their boogers.
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux