From 900001098b6917f10cac2ce7161c0bce90faf75b Mon Sep 17 00:00:00 2001 From: badlogic Date: Fri, 25 Nov 2016 16:02:49 +0100 Subject: [PATCH] [c] Fixed leak in AnimationState, wasn't disposing mixing from entries when entire state is disposed. Confirmed that disposing of mixing froms is done properly if anim state is allowed to update until the mixing from is done. --- spine-c/src/spine/AnimationState.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spine-c/src/spine/AnimationState.c b/spine-c/src/spine/AnimationState.c index f00bb5476..cbc8ebb57 100644 --- a/spine-c/src/spine/AnimationState.c +++ b/spine-c/src/spine/AnimationState.c @@ -175,7 +175,8 @@ void _spEventQueue_drain (_spEventQueue* self) { } void _spAnimationState_disposeTrackEntry (spTrackEntry* entry) { - FREE(entry->timelinesFirst); + if (entry->mixingFrom) _spAnimationState_disposeTrackEntry(entry->mixingFrom); + FREE(entry->timelinesFirst); FREE(entry->timelinesRotation); FREE(entry); }