backend: Destroy backend explicitly

This now ensures that calling meta_release_backend() destroys the
backend.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
This commit is contained in:
Jonas Ådahl 2021-03-12 08:39:53 +01:00 committed by Marge Bot
parent c1810d6947
commit c5f699b8b3

View File

@ -252,6 +252,13 @@ meta_backend_dispose (GObject *object)
G_OBJECT_CLASS (meta_backend_parent_class)->dispose (object);
}
static void
meta_backend_destroy (MetaBackend *backend)
{
g_object_run_dispose (G_OBJECT (backend));
g_object_unref (backend);
}
static void
meta_backend_sync_screen_size (MetaBackend *backend)
{
@ -1534,7 +1541,7 @@ meta_init_backend (GType backend_gtype,
void
meta_release_backend (void)
{
g_clear_object (&_backend);
g_clear_pointer (&_backend, meta_backend_destroy);
}
void