[clutter/clutter-1.10] stage: Remove an extra reference count
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.10] stage: Remove an extra reference count
- Date: Sat, 11 Aug 2012 09:32:57 +0000 (UTC)
commit 9659ed0e0b7e49b1d6ed03c479ae4d6f85cfd65c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Jun 24 18:02:45 2012 +0100
stage: Remove an extra reference count
The dispose sequence will keep the object alive, and we need to release
the last reference held by the StageManager before releasing control to
GObject.
(cherry picked from commit ab88511133188ef8965ffb3ab4342bd1da27c2e8)
Signed-off-by: Emmanuele Bassi <ebassi gnome org>
clutter/clutter-stage.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index e40b0c9..6472a27 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -1802,13 +1802,6 @@ clutter_stage_dispose (GObject *object)
clutter_actor_hide (CLUTTER_ACTOR (object));
- /* remove_stage() will unref() the stage instance, so we need to
- * add a reference here to keep it temporarily alive
- */
- g_object_ref (object);
- stage_manager = clutter_stage_manager_get_default ();
- _clutter_stage_manager_remove_stage (stage_manager, stage);
-
_clutter_clear_events_queue_for_stage (stage);
if (priv->impl != NULL)
@@ -1824,6 +1817,10 @@ clutter_stage_dispose (GObject *object)
clutter_actor_remove_all_children (CLUTTER_ACTOR (object));
+ /* this will release the reference on the stage */
+ stage_manager = clutter_stage_manager_get_default ();
+ _clutter_stage_manager_remove_stage (stage_manager, stage);
+
G_OBJECT_CLASS (clutter_stage_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]