Re: dispose and finalize
- From: Artur Galyamov <artur-pub yandex ru>
- To: Martin Kalbfuß <ma kalbfuss web de>
- Cc: Gtk+ <gtk-list gnome org>
- Subject: Re: dispose and finalize
- Date: Wed, 20 Jan 2010 20:09:30 +0300
20.01.10, 17:56, "Martin Kalbfuß" <ma kalbfuss web de>:
> Hi,
> what's the difference between dispose and finalize? And which members
> have to be freed in which of these functions?
> Thanks
In dispose you should drop all references to other GObjects.
In finalize you free other data (char *, GArray *, etc.)
"dispose" can be invoked more than one time before "finalize".
See also [1], specifically last section.
[1] http://library.gnome.org/devel/gobject/stable/gobject-memory.html
--
Artur
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]