mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
actor: Call unparent() in destroy
If the actor is an internal child of another actor then we should call unparent() when destroying it, like clutter_actor_reparent() does; otherwise we'll leak the actor, since the parent holds a reference to it. http://bugzilla.openedhand.com/show_bug.cgi?id=2009
This commit is contained in:
parent
9f67e4826c
commit
ce6a24eb2b
@ -3067,7 +3067,7 @@ clutter_actor_dispose (GObject *object)
|
||||
clutter_container_remove_actor (CLUTTER_CONTAINER (parent), self);
|
||||
}
|
||||
else
|
||||
priv->parent_actor = NULL;
|
||||
clutter_actor_unparent (self);
|
||||
}
|
||||
|
||||
/* parent should be gone */
|
||||
@ -7010,7 +7010,7 @@ clutter_actor_reparent (ClutterActor *self,
|
||||
else
|
||||
clutter_actor_unparent (self);
|
||||
|
||||
/* Note, will call parent() */
|
||||
/* Note, will call parent() */
|
||||
if (CLUTTER_IS_CONTAINER (new_parent))
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (new_parent), self);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user