2007-11-27 Emmanuele Bassi <ebassi@openedhand.com>
authorEmmanuele Bassi <ebassi@openedhand.com>
Tue, 27 Nov 2007 11:05:26 +0000 (11:05 +0000)
committerEmmanuele Bassi <ebassi@openedhand.com>
Tue, 27 Nov 2007 11:05:26 +0000 (11:05 +0000)
* clutter/clutter-actor.c (clutter_actor_destroy): Remove the
reference we hold on the actor, as it was preventing the finalization
of every child on the stage.

ChangeLog
clutter/clutter-actor.c

index 2b68b10..fe5b2c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-27  Emmanuele Bassi  <ebassi@openedhand.com>
+
+       * clutter/clutter-actor.c (clutter_actor_destroy): Remove the
+       reference we hold on the actor, as it was preventing the finalization
+       of every child on the stage.
+
 2007-11-26  Emmanuele Bassi  <ebassi@openedhand.com>
 
        * clutter/x11/clutter-stage-x11.c:
index 12083ca..39cde93 100644 (file)
@@ -1124,9 +1124,10 @@ clutter_actor_dispose (GObject *object)
 {
   ClutterActor *self = CLUTTER_ACTOR (object);
 
-  CLUTTER_NOTE (MISC, "Disposing of object (id=%d) of type `%s'",
+  CLUTTER_NOTE (MISC, "Disposing of object (id=%d) of type `%s' (ref_count:%d)",
                self->priv->id,
-               g_type_name (G_OBJECT_TYPE (self)));
+               g_type_name (G_OBJECT_TYPE (self)),
+                object->ref_count);
 
  if (!(CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IN_DESTRUCTION))
     {
@@ -1145,6 +1146,10 @@ clutter_actor_finalize (GObject *object)
 {
   ClutterActor *actor = CLUTTER_ACTOR (object);
 
+  CLUTTER_NOTE (MISC, "Finalize object (id=%d) of type `%s'",
+               actor->priv->id,
+               g_type_name (G_OBJECT_TYPE (actor)));
+
   g_free (actor->priv->name);
 
   G_OBJECT_CLASS (clutter_actor_parent_class)->finalize (object);
@@ -1728,6 +1733,8 @@ clutter_actor_destroy (ClutterActor *self)
 
   if (!(CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IN_DESTRUCTION))
     g_object_run_dispose (G_OBJECT (self));
+
+  g_object_unref (self);
 }
 
 /**