Re: Destroy signal
- From: John Cupitt <john cupitt ng-london org uk>
- To: francex tiscali it
- Cc: gtk-list gnome org
- Subject: Re: Destroy signal
- Date: Mon, 20 Oct 2003 15:50:59 +0000
Hi,
francex tiscali it wrote:
This last func, automatically generates a new 'destroy' signal, and so 'Close_Function'
is called two times...
Destroy can be called many times. It means "this object is going to be destroyed, please drop all references". You'll need to write your Close_Function() so that it can be called many times.
Alternatively, you can link to "finalize". This will be called only once, right at the end of the object's life. However, many things about the object will no longer be valid by this point (you won't be able to disconnect signals, for example), so finalize is only useful for stuff like freeing object strings.
Mathieu Lacage has a very good discussion of all this here:
http://www.le-hacker.org/papers/gobject/ch04s02.html
gtk's destroy is another name for gobject's dispose (more or less).
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]