Re: finalize, dispose and destroy
- From: Tristan Van Berkom <vantr touchtunes com>
- To: gtk-app-devel-list gnome org
- Subject: Re: finalize, dispose and destroy
- Date: Fri, 05 Mar 2004 16:39:24 -0500
Paul Pogonyshev wrote:
[snip]
Is that good enough if my widget is a container? And if it holds
some weird references to other widgets (i.e. ones that GtkContainer
implementation cannot detect)?
If the refcount on a container drops to 0, it is up to the
container to release its resources, if it "contains" other objects,
it is up to the container to hold a reference on them untill the container
is finalized (at which point it g_object_unref's its contents), if
the user doesn't want a contained object to be destroyed as a result
if the containers destruction, he must hold an explicit reference.
Usualy this is the case (the death of the container triggers the death
of its components).
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]