Re: Unloading sequence of GTK
- From: Owen Taylor <otaylor redhat com>
- To: Dave Benson <daveb idealab com>
- Cc: gtk-devel-list gnome org, muppet <scott asofyet org>
- Subject: Re: Unloading sequence of GTK
- Date: Tue, 21 Mar 2006 15:58:54 -0500
On Tue, 2006-03-21 at 10:07 -0800, Dave Benson wrote:
> On Tue, Mar 21, 2006 at 11:10:24AM -0500, Owen Taylor wrote:
> > (*) Basically, it's impossible for GObject to know when a type is no
> > longer in use, because we don't have garbage collection in C.
> > So, if you unload and reload GTK+ again, referencing the
> > type "GtkButton" is going to try to create a button object from
> > the last copy of the GTK+ libraries.
>
> well, if GTypes weren't permanent, there could be a g_type_ref(),
> g_type_unref(), and g_type_unregister()... gtk_unload() could call
> g_type_unregister() on all the common types.
>
> (actually, that might allow for a non-global type-context,
> which i've occasionally wanted...)
The point about garbage collection isn't that you couldn't have
manual memory management for GType, but rather that it would be
incredibly annoying.
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]