Merge pull request #5944 from aeonmine/develop

Fix a memory leak in ActionManagerEx::initWithDictionary.
This commit is contained in:
James Chen 2014-03-25 13:48:33 +08:00
commit 400408f204
1 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V
int actionCount = DICTOOL->getArrayCount_json(dic, "actionlist");
for (int i=0; i<actionCount; i++) {
ActionObject* action = new ActionObject();
action->autorelease();
const rapidjson::Value &actionDic = DICTOOL->getDictionaryFromArray_json(dic, "actionlist", i);
action->initWithDictionary(actionDic,root);
actionList.pushBack(action);
@ -122,4 +123,4 @@ void ActionManagerEx::releaseActions()
_actionDic.clear();
}
}
}