diff --git a/cocos/2d/CCFastTMXLayer.cpp b/cocos/2d/CCFastTMXLayer.cpp index e4bf2646b3..c003c7143e 100644 --- a/cocos/2d/CCFastTMXLayer.cpp +++ b/cocos/2d/CCFastTMXLayer.cpp @@ -130,7 +130,7 @@ TMXLayer::~TMXLayer() { CC_SAFE_RELEASE(_tileSet); CC_SAFE_RELEASE(_texture); - CC_SAFE_DELETE_ARRAY(_tiles); + CC_SAFE_FREE(_tiles); CC_SAFE_RELEASE(_vData); CC_SAFE_RELEASE(_vertexBuffer); CC_SAFE_RELEASE(_indexBuffer); diff --git a/cocos/2d/CCTMXLayer.cpp b/cocos/2d/CCTMXLayer.cpp index aff4c26f7b..8f38af5e5f 100644 --- a/cocos/2d/CCTMXLayer.cpp +++ b/cocos/2d/CCTMXLayer.cpp @@ -152,7 +152,7 @@ void TMXLayer::releaseMap() { if (_tiles) { - delete [] _tiles; + free(_tiles); _tiles = nullptr; } diff --git a/cocos/editor-support/spine/SkeletonRenderer.cpp b/cocos/editor-support/spine/SkeletonRenderer.cpp index 8864b97330..2a86d623a7 100644 --- a/cocos/editor-support/spine/SkeletonRenderer.cpp +++ b/cocos/editor-support/spine/SkeletonRenderer.cpp @@ -98,7 +98,7 @@ SkeletonRenderer::~SkeletonRenderer () { spSkeleton_dispose(_skeleton); if (_atlas) spAtlas_dispose(_atlas); if (_attachmentLoader) spAttachmentLoader_dispose(_attachmentLoader); - delete _worldVertices; + delete [] _worldVertices; } void SkeletonRenderer::initWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) {