Re: [gtk-list] non-exiting gtk_exit()

Tomas Berndtsson <> writes: 
> What I found was that gtk_exit() didn't just restore the GTK+ specific 
> things, and free allocated memory, but it also exited the whole
> program, even if it was called from within the user interface thread.

gtk_exit() doesn't clean anything up, it just calls exit().
GTK installs a function with atexit() that does some cleanup. 

> If I did not call gtk_exit() at all, the program seg faulted somewhere 
> in exit(), for unknown reasons. When calling gtk_exit(), it exited ok, 
> but the extra things the main thread should do, wasn't performed.

exit() should be fine, you just want to figure out that cause of that

> Is there any way to do what gtk_exit() does, but not exit the program
> at the same time? 

Yes, gtk_exit() doesn't do anything but exit, so doing nothing at all
will do what you want. ;-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]