[clutter/wip/apocalypses/apocalypse-1: 23/46] actor: Do not leak the layout manager



commit 1e570d3dd2058f125ca1b8f6a0023f0e25f00208
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Nov 29 18:10:57 2011 +0000

    actor: Do not leak the layout manager

 clutter/clutter-actor.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 84f77f7..7a9b7bf 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -3972,7 +3972,7 @@ clutter_actor_dispose (GObject *object)
       g_assert (!CLUTTER_ACTOR_IS_REALIZED (self));
     }
 
-  if (priv->pango_context)
+  if (priv->pango_context != NULL)
     {
       g_object_unref (priv->pango_context);
       priv->pango_context = NULL;
@@ -4002,6 +4002,13 @@ clutter_actor_dispose (GObject *object)
       priv->flatten_effect = NULL;
     }
 
+  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_signal_emit (self, actor_signals[DESTROY], 0);
 
   G_OBJECT_CLASS (clutter_actor_parent_class)->dispose (object);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]