Change 'debugexit' to quit main loop rather than exit(), add cleanup
A new envrionment variable GNOME_SHELL_ENABLE_CLEANUP is added which causes us to attempt freeing global data. The reason this isn't enabled by default is that it's a waste of time at best, and at worst in corner cases could cause crashes which would fill up crash databases. Better to leave it as a developer-only tool. Start stubbing out some cleanup in ShellGlobal. https://bugzilla.gnome.org/show_bug.cgi?id=649517
This commit is contained in:
11
src/main.c
11
src/main.c
@ -453,6 +453,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
GOptionContext *ctx;
|
||||
GError *error = NULL;
|
||||
int ecode;
|
||||
|
||||
g_type_init ();
|
||||
|
||||
@ -507,5 +508,13 @@ main (int argc, char **argv)
|
||||
/* Initialize the global object */
|
||||
shell_global_get ();
|
||||
|
||||
return meta_run ();
|
||||
ecode = meta_run ();
|
||||
|
||||
if (g_getenv ("GNOME_SHELL_ENABLE_CLEANUP"))
|
||||
{
|
||||
g_printerr ("Doing final cleanup...\n");
|
||||
g_object_unref (shell_global_get ());
|
||||
}
|
||||
|
||||
return ecode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user