From f1a120ca3687c20ad81c8645157924147e4251e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Sat, 10 Apr 2021 00:42:46 +0200 Subject: [PATCH] backend: Clean up GPU instances last Various things, e.g, the renderer, the stage, either directly or indirectly depends on GPU objects being alive during tear-down. Make it so, by moving GPU cleanup after the other cleaning. This will allow tearing down a couple of more objects. Part-of: --- src/backends/meta-backend.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c index f0f9d8077..45e8b6d3b 100644 --- a/src/backends/meta-backend.c +++ b/src/backends/meta-backend.c @@ -199,12 +199,6 @@ meta_backend_dispose (GObject *object) MetaBackend *backend = META_BACKEND (object); MetaBackendPrivate *priv = meta_backend_get_instance_private (backend); - if (priv->gpus) - { - g_list_free_full (priv->gpus, g_object_unref); - priv->gpus = NULL; - } - g_clear_object (&priv->current_device); g_clear_object (&priv->monitor_manager); g_clear_object (&priv->orientation_manager); @@ -249,6 +243,7 @@ meta_backend_dispose (GObject *object) g_clear_pointer (&priv->default_seat, clutter_seat_destroy); g_clear_pointer (&priv->stage, clutter_actor_destroy); g_clear_pointer (&priv->clutter_backend, clutter_backend_destroy); + g_clear_list (&priv->gpus, g_object_unref); G_OBJECT_CLASS (meta_backend_parent_class)->dispose (object); }