Browse Source

[c] Fixed memory leak in AnimationState.c

badlogic 8 years ago
parent
commit
04e4d1f40d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      spine-c/src/spine/AnimationState.c

+ 2 - 0
spine-c/src/spine/AnimationState.c

@@ -67,6 +67,7 @@ _spEventQueue* _spEventQueue_create (_spAnimationState* state) {
 
 
 void _spEventQueue_free (_spEventQueue* self) {
 void _spEventQueue_free (_spEventQueue* self) {
 	FREE(self->objects);
 	FREE(self->objects);
+    FREE(self);
 }
 }
 
 
 void _spEventQueue_ensureCapacity (_spEventQueue* self, int newElements) {
 void _spEventQueue_ensureCapacity (_spEventQueue* self, int newElements) {
@@ -214,6 +215,7 @@ void spAnimationState_dispose (spAnimationState* self) {
 	_spEventQueue_free(internal->queue);
 	_spEventQueue_free(internal->queue);
 	FREE(internal->events);
 	FREE(internal->events);
 	FREE(internal->propertyIDs);
 	FREE(internal->propertyIDs);
+    FREE(internal);
 }
 }
 
 
 void spAnimationState_update (spAnimationState* self, float delta) {
 void spAnimationState_update (spAnimationState* self, float delta) {