Re: GtkImage simple question, please help
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-list gnome org
- Subject: Re: GtkImage simple question, please help
- Date: Sun, 25 Jun 2006 11:46:14 +0200
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]