Re: GTK 'unload'ability
- From: Tim Janik <timj gtk org>
- To: gtk-devel-list redhat com
- cc: Eyal Lotem <peaker makif omer k12 il>
- Subject: Re: GTK 'unload'ability
- Date: Tue, 14 Sep 1999 05:34:32 +0200 (CEST)
On Mon, 13 Sep 1999, Eyal Lotem wrote:
> Hello,
> I've been wanting to be able to unload the GTK library, but it has been
> impossible due to the use of the 'atexit' function as the only unloading
> method. I would really appriciate it if someone added support for
> uninitializing GTK without actually exiting the program, which is quite
> simple:
> - Rename gtk_exit_func to gtk_uninit, and make it global (in gtkmain.h)
> - Rename gtk's initialization function to name_real, and have it accept a
> parameter whether to 'atexit' or not. Then have the init function
> (gtk_init_check if I'm not mistaken) call that initialization function
> and tell it to use atexit. But also globalize the initialization function
> that can use NO atexit, so it is possible to uninit GTK without exiting.
> If someone applied this patch to the CVS tree, I'd appriciate it...
i'm sorry to tell you Eyal that this is uttely impossible.
gtk (and glib) allocate huge chunks of static data that no reference
counting is performed upon, and do lots of other non-revertable
stuff (whithin the scope of a programs lifetime).
being able to unload gtk, gdk or glib has just not been within the
initial design goals and would require a nearly-complete rewrite
of the libraries in question, _as well as_ any code that actually makes
use of them (i.e. *all* gtk programs out there).
patching the atexit() handlers is just a sad attempt at preventing your
program from segfaulting when you immediatedly exit after "unloading".
> Thanks, Eyal Lotem
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]