shell: Make singletons owned by ShellGlobal
This means also means they will be cleaned up when disposing ShellGlobal, which will then mean signals tied to the GObject lifetime will be disconnected. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6536 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
This commit is contained in:
@ -763,10 +763,5 @@ on_enable_monitoring_key_changed (GSettings *settings,
|
||||
ShellAppUsage *
|
||||
shell_app_usage_get_default (void)
|
||||
{
|
||||
static ShellAppUsage *instance;
|
||||
|
||||
if (instance == NULL)
|
||||
instance = g_object_new (SHELL_TYPE_APP_USAGE, NULL);
|
||||
|
||||
return instance;
|
||||
return shell_global_get_app_usage (shell_global_get ());
|
||||
}
|
||||
|
Reference in New Issue
Block a user