Browse Source

[c] Closes #1247, memory leak in SkeletonBinary when reading non-weighted meshes.

badlogic 6 năm trước cách đây
mục cha
commit
ccc1013461
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      spine-c/spine-c/src/spine/SkeletonBinary.c

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

@@ -649,6 +649,8 @@ static void _readVertices(spSkeletonBinary* self, _dataInput* input, spVertexAtt
 		attachment->vertices = _readFloatArray(input, verticesLength, self->scale);
 		attachment->bonesCount = 0;
 		attachment->bones = 0;
+		spFloatArray_dispose(weights);
+		spFloatArray_dispose(bones);
 		return;
 	}