[mutter] Revert "Unparent rather than destroy MutterWindows."
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Subject: [mutter] Revert "Unparent rather than destroy MutterWindows."
- Date: Tue, 23 Jun 2009 14:14:19 -0400 (EDT)
commit 072ec184d368072194f1a6b32b25e2a1e5296994
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Apr 27 18:34:52 2009 -0400
Revert "Unparent rather than destroy MutterWindows."
This reverts commit 16d49695ad07555a36fe7ad4f60067fc944689f4.
If we want an actor to go away deterministically, we should call
clutter_actor_destroy(); using unparent instead a) may result
leaks through cyclic ref counts, and b) will delay the deallocation
of the window texture in a garbage collected environment until
the next garbage collection, causing much greater transient use
of memory.
http://bugzilla.gnome.org/show_bug.cgi?id=580520
src/compositor/mutter/compositor-mutter.c | 28 +++-------------------------
1 files changed, 3 insertions(+), 25 deletions(-)
---
diff --git a/src/compositor/mutter/compositor-mutter.c b/src/compositor/mutter/compositor-mutter.c
index 1ab954c..299575b 100644
--- a/src/compositor/mutter/compositor-mutter.c
+++ b/src/compositor/mutter/compositor-mutter.c
@@ -1130,14 +1130,7 @@ mutter_window_effect_completed (MutterWindow *cw, gulong event)
if (priv->needs_destroy && effect_in_progress (cw, TRUE) == FALSE)
{
- ClutterActor *cwa = CLUTTER_ACTOR (cw);
- ClutterActor *parent = clutter_actor_get_parent (cwa);
-
- if (CLUTTER_IS_CONTAINER (parent))
- clutter_container_remove_actor (CLUTTER_CONTAINER (parent), cwa);
- else
- clutter_actor_unparent (cwa);
-
+ clutter_actor_destroy (CLUTTER_ACTOR (cw));
return;
}
@@ -1201,14 +1194,7 @@ destroy_win (MutterWindow *cw)
/*
* No effects, just kill it.
*/
- ClutterActor *cwa = CLUTTER_ACTOR (cw);
- ClutterActor *parent = clutter_actor_get_parent (cwa);
-
- if (CLUTTER_IS_CONTAINER (parent))
- clutter_container_remove_actor (CLUTTER_CONTAINER (parent), cwa);
- else
- clutter_actor_unparent (cwa);
-
+ clutter_actor_destroy (CLUTTER_ACTOR (cw));
return;
}
@@ -1238,15 +1224,7 @@ destroy_win (MutterWindow *cw)
priv->needs_destroy = TRUE;
}
else
- {
- ClutterActor *cwa = CLUTTER_ACTOR (cw);
- ClutterActor *parent = clutter_actor_get_parent (cwa);
-
- if (CLUTTER_IS_CONTAINER (parent))
- clutter_container_remove_actor (CLUTTER_CONTAINER (parent), cwa);
- else
- clutter_actor_unparent (cwa);
- }
+ clutter_actor_destroy (CLUTTER_ACTOR (cw));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]