mirror of https://github.com/axmolengine/axmol.git
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:
parent
b22efc9115
commit
59574f95e0
|
@ -130,7 +130,7 @@ TMXLayer::~TMXLayer()
|
||||||
{
|
{
|
||||||
CC_SAFE_RELEASE(_tileSet);
|
CC_SAFE_RELEASE(_tileSet);
|
||||||
CC_SAFE_RELEASE(_texture);
|
CC_SAFE_RELEASE(_texture);
|
||||||
CC_SAFE_DELETE_ARRAY(_tiles);
|
CC_SAFE_FREE(_tiles);
|
||||||
CC_SAFE_RELEASE(_vData);
|
CC_SAFE_RELEASE(_vData);
|
||||||
CC_SAFE_RELEASE(_vertexBuffer);
|
CC_SAFE_RELEASE(_vertexBuffer);
|
||||||
CC_SAFE_RELEASE(_indexBuffer);
|
CC_SAFE_RELEASE(_indexBuffer);
|
||||||
|
|
|
@ -152,7 +152,7 @@ void TMXLayer::releaseMap()
|
||||||
{
|
{
|
||||||
if (_tiles)
|
if (_tiles)
|
||||||
{
|
{
|
||||||
delete [] _tiles;
|
free(_tiles);
|
||||||
_tiles = nullptr;
|
_tiles = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ SkeletonRenderer::~SkeletonRenderer () {
|
||||||
spSkeleton_dispose(_skeleton);
|
spSkeleton_dispose(_skeleton);
|
||||||
if (_atlas) spAtlas_dispose(_atlas);
|
if (_atlas) spAtlas_dispose(_atlas);
|
||||||
if (_attachmentLoader) spAttachmentLoader_dispose(_attachmentLoader);
|
if (_attachmentLoader) spAttachmentLoader_dispose(_attachmentLoader);
|
||||||
delete _worldVertices;
|
delete [] _worldVertices;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkeletonRenderer::initWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) {
|
void SkeletonRenderer::initWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) {
|
||||||
|
|
Loading…
Reference in New Issue