Re: GTK_DESTROYED not set after gtk_object_destroy() ?
- From: murrayc t-online de (Murray Cumming)
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: GTK_DESTROYED not set after gtk_object_destroy() ?
- Date: 07 Oct 2001 22:12:18 +0200
On Sun, 2001-10-07 at 21:53, Owen Taylor wrote:
>
> murrayc t-online de (Murray Cumming) writes:
>
> > Gtk-- needs to know whether objects have been destroyed, and we would
> > normally just check for the GTK_DESTROYED flag. But it seems to be unset
> > at the end of gtk_object_dispose(), which is called indirectly by
> > gtk_object_destroy() and g_object_unref().
> >
> > Have I misread the code?
> >
> > I guess that we can catch the destroyed signal instead, but the flag
> > would be simpler.
>
> There _are_ no destroyed objects in GTK+-2.0. The gtk_widget_destroy()
> operation indicates "release all references to this object" and
> is used in conjunction with reference counting to avoid the reference
> count loops that pure reference counting leads to, especially
> when combined with language bindings that automatically reference
> count objects.
Well, we need to know when that has happened so that we can release
resources, so I guess we'll just catch the GtkObject::destroy signal and
store a boolean. Thanks.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]