mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 15:37:00 -05:00
Revert "Unparent rather than destroy MutterWindows."
This reverts commit 16d49695ad
.
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
This commit is contained in:
parent
321b40a386
commit
072ec184d3
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user