mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5944 from aeonmine/develop
Fix a memory leak in ActionManagerEx::initWithDictionary.
This commit is contained in:
commit
400408f204
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue