memory leak in ccvector_to_luaval


#1

I found that that the ccvetor_to_luaval function can cause the memory leak in line 256(“obj->retain();”).

when I using the Node:getChirdren() in lua, I found that all the chirdren node can’t be released when I change the scene, which call the ccvector_to_luaval to change array to lua table.

After I commented this line, this memory leas disappeared. It works fine for me.


#2

Yeah, cocos2d::Vector already retain the_referenceCount,soretainin theccvector_to_luaval ` was wrong.Thank you.