mirror of https://github.com/axmolengine/axmol.git
ccvector_to_luaval would lead to memory leak because call the `retain`
This commit is contained in:
parent
056303ea35
commit
c38388cc62
|
@ -253,7 +253,6 @@ void ccvector_to_luaval(lua_State* L,const cocos2d::Vector<T>& inValue)
|
||||||
int* luaID = (obj) ? &obj->_luaID : NULL;
|
int* luaID = (obj) ? &obj->_luaID : NULL;
|
||||||
toluafix_pushusertype_ccobject(L, ID, luaID, (void*)obj,iter->second.c_str());
|
toluafix_pushusertype_ccobject(L, ID, luaID, (void*)obj,iter->second.c_str());
|
||||||
lua_rawset(L, -3);
|
lua_rawset(L, -3);
|
||||||
obj->retain();
|
|
||||||
++indexTable;
|
++indexTable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue