From 2894587b221352241d8eb5fdb1136d9856c36b3c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 29 Nov 2011 18:10:57 +0000 Subject: [PATCH] actor: Do not leak the layout manager --- clutter/clutter-actor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 67c137a45..e44fce45b 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -3997,6 +3997,13 @@ clutter_actor_dispose (GObject *object) g_clear_object (&priv->effects); g_clear_object (&priv->flatten_effect); + if (priv->layout_manager != NULL) + { + clutter_layout_manager_set_container (priv->layout_manager, NULL); + g_object_unref (priv->layout_manager); + priv->layout_manager = NULL; + } + G_OBJECT_CLASS (clutter_actor_parent_class)->dispose (object); }