Re: GtkImage/GdkPixbuf memory management
- From: Sven Neumann <sven gimp org>
- To: "Kristof Vanbecelaere" <kristof vanbecelaere sonycom com>
- Cc: <gtk-list gnome org>
- Subject: Re: GtkImage/GdkPixbuf memory management
- Date: 13 Jun 2002 12:29:37 +0200
Hi,
"Kristof Vanbecelaere" <kristof vanbecelaere sonycom com> writes:
> I want to implement some operation on a GtkImage by creating a new GdkPixbuf
> and then calling gtk_image_set_from_pixbuf().
>
> Is this the recommended way to implement such modifications? What about
> memory management? Should I somehow free/unref the old pixbuf? And what
> about the new pixbuf, should it be unref'ed after setting it to the image?
GtkImage unrefs the previously set GdkPixbuf for you. It also refs the new
one. So you should unref a pixbuf after setting it.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]