barriers: Free backend implementation at dispose time

When a MetaBarrier is first created it allocates a backend
impl object which does the actual heavy lifting.

Unfortunately, that backend object is never freed.

This commit ensures the implementation gets freed when
the barrier object is freed.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1451
This commit is contained in:
Ray Strode 2020-09-25 14:04:31 -04:00
parent 97f10a0d21
commit 1e78d90a37

View File

@ -128,6 +128,7 @@ static void
meta_barrier_dispose (GObject *object)
{
MetaBarrier *barrier = META_BARRIER (object);
MetaBarrierPrivate *priv = barrier->priv;
if (meta_barrier_is_active (barrier))
{
@ -135,6 +136,8 @@ meta_barrier_dispose (GObject *object)
barrier);
}
g_clear_object (&priv->impl);
G_OBJECT_CLASS (meta_barrier_parent_class)->dispose (object);
}