Re: dispose and finalize
- From: Holger Berndt <berndth gmx de>
- To: Martin Kalbfuß <ma kalbfuss web de>
- Cc: Gtk+ <gtk-list gnome org>
- Subject: Re: dispose and finalize
- Date: Wed, 20 Jan 2010 17:24:28 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]