Re: Just out of curiosity
- From: Owen Taylor <otaylor redhat com>
- To: "Buch, William H." <bbuch hqm com>
- Cc: "'gtk-list redhat com'" <gtk-list redhat com>
- Subject: Re: Just out of curiosity
- Date: 13 Jul 1998 15:27:49 -0400
"Buch, William H." <bbuch@hqm.com> writes:
> When the final procedure gtk_main_quit() is called, what happens? does
> complete garbage collection follow? What happens about un-parented
> objects, such as dialog
> windows, when the program ends. Do I need to write my own procedure for
> closing down before calling gtk_main_quit?
After you create everything, you called
gtk_main();
Probably at the end of your main() function.
All gtk_main() does is make this call quit. Any cleanup GTK+
needs to do is done in atexit() functions, and won't occur until
your application exits. (All windows and memory resources
get cleaned up in any case by X and/or the OS, but there are
a few additional items that GTK+ wants to take care of.)
It is perfectly legitimate to call gtk_main() then gtk_main_quit()
multiple times in an application.
If you need to do program specific cleanup, a good place to
do it is after the call to gtk_main().
/* Create the widgets */
gtk_main(); /* Run the program */
/* Cleanup any app-specific stuff */
Regards,
OIwen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]