Fix ActionObject memory leak bug

This commit is contained in:
mine_masahiro 2014-03-25 11:44:26 +09:00
parent bfa7d3e38c
commit 3a0ee65a7e
1 changed files with 1 additions and 0 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);