[mutter/wip/fix-barrier-leak] barriers: Free backend implementation at dispose time
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/fix-barrier-leak] barriers: Free backend implementation at dispose time
- Date: Sun, 27 Sep 2020 04:39:17 +0000 (UTC)
commit 1e78d90a37903d1eaef8f503bf7711a6829df82e
Author: Ray Strode <rstrode redhat com>
Date: Fri Sep 25 14:04:31 2020 -0400
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
src/backends/meta-barrier.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/backends/meta-barrier.c b/src/backends/meta-barrier.c
index ad6c8d5833..71536c3d71 100644
--- a/src/backends/meta-barrier.c
+++ b/src/backends/meta-barrier.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]