Fix mismatched memory deallocators (#16596)

* Fix mismatched memory deallocator in CCFastTMXLayer.cpp

* Fix mismatched memory deallocator on SkeletonRenderer.cpp

* Fix mismatched memory deallocator in CCTMXLayer.cpp
This commit is contained in:
Wilson E. Alvarez 2016-09-26 02:18:48 -04:00 committed by minggo
parent b22efc9115
commit 59574f95e0
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -152,7 +152,7 @@ void TMXLayer::releaseMap()
{
if (_tiles)
{
delete [] _tiles;
free(_tiles);
_tiles = nullptr;
}

View File

@ -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) {