stage-view: Add clutter_stage_view_destroy()

This aims to make sure a view and its resources are destroyed when it
should. Using references might keep certain components (e.g frame clock)
alive for too long.

We currently don't take any long lived references to the stage view
anywhere, so this doesn't matter in practice, but this may change, and
will be used by a to be added test case.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1404
This commit is contained in:
Jonas Ådahl
2020-08-12 15:28:34 +02:00
parent a13c307fa4
commit fb0f03640a
4 changed files with 15 additions and 5 deletions

View File

@ -143,7 +143,7 @@ meta_renderer_real_rebuild_views (MetaRenderer *renderer)
meta_backend_get_monitor_manager (backend);
GList *logical_monitors, *l;
g_list_free_full (priv->views, g_object_unref);
g_list_free_full (priv->views, (GDestroyNotify) clutter_stage_view_destroy);
priv->views = NULL;
logical_monitors =