From eb51f6cf10bec7ec8ea45761a154a8961f162ba3 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 1 Jan 2015 12:48:39 +0000 Subject: [PATCH] actor: Do not restore the easing state in finalize() The easing state is part of the AnimationInfo structure, which is stored inside the GObject's datalist. Each instance frees the data stored there during finalization, so there is no point for us to restore an easing state (which may or may not be the last one) just to have everything cleared out once we chain up to GObject's own finalize() implementation. --- clutter/clutter-actor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 43458b824..45e1ac4f9 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -5894,10 +5894,8 @@ clutter_actor_finalize (GObject *object) CLUTTER_NOTE (MISC, "Finalize actor (name='%s', id=%d) of type '%s'", priv->name != NULL ? priv->name : "", - priv->id, - g_type_name (G_OBJECT_TYPE (object))); - - clutter_actor_restore_easing_state (CLUTTER_ACTOR (object)); + priv->id, + g_type_name (G_OBJECT_TYPE (object))); _clutter_context_release_id (priv->id); @@ -8456,6 +8454,9 @@ clutter_actor_init (ClutterActor *self) */ priv->needs_compute_expand = FALSE; + /* we start with an easing state with duration forcibly set + * to 0, for backward compatibility. + */ clutter_actor_save_easing_state (self); clutter_actor_set_easing_duration (self, 0); }