[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    Re: dispose and finalize
From:       Martin =?ISO-8859-1?Q?Kalbfu=DF?= <ma.kalbfuss () web ! de>
Date:       2010-01-20 16:30:56
Message-ID: 1264008039.2865.5.camel () localhost
[Download RAW message or body]

OK Thanks,

So if I have a Garray member, I call g_array_unref in finalize, because
it isn't a child of GObject. Correct?

Am Mittwoch, den 20.01.2010, 17:24 +0100 schrieb Holger Berndt:
> On Wed, 20 Jan 2010 17:56:18 +0100 Martin KalbfuƟ wrote:
> 
> > what's the difference between dispose and finalize? And which members
> > have to be freed in which of these functions?
> 
> See http://library.gnome.org/devel/gobject/unstable/gobject-memory.html
> 
> The difference in short:
> 
> dispose:
> - g_object_unref() all GObject member variables
> - function must be safe against being called multiple times
> 
> finalize:
> - free all other (non-GObject) members, close file descriptors etc
> 
> Holger


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic