From 7ec409c3bb9ccef89a780af579430c5b2b97abca Mon Sep 17 00:00:00 2001 From: mogemimi Date: Thu, 7 Apr 2016 02:22:06 +0900 Subject: [PATCH] Fix memory leak in DataReaderHelper --- cocos/editor-support/cocostudio/CCDataReaderHelper.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp index 27a1e063c8..5ac46fdcbf 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp @@ -2287,8 +2287,7 @@ void DataReaderHelper::decodeNode(BaseData *node, const rapidjson::Value& json, { if (movementBoneData->frameList.size() > 0) { - FrameData *frameData = new (std::nothrow) FrameData(); - frameData = movementBoneData->frameList.at(framesizemusone); + auto frameData = movementBoneData->frameList.at(framesizemusone); movementBoneData->addFrameData(frameData); frameData->release(); frameData->frameID = movementBoneData->duration;