LuaEventNode leak
it maybe a memory leak with the following code: node:setTouchSwallowEnabled(false) node:setTouchEnabled(false) , when look deep in c++ code, setTouchSwallowEnabled create a LuaEventNode by mng->getLuaNodeByNode(self, true); but this LuaEventNode may have no chance to remove.
fix: call setBaseNodeEventListener() in NodeEx.lua
ps setTouchCaptureEnabled setTouchMode setTouchSwallowEnabled, may have the same issue.
Fixed. Thank you!
another case may cause leak. local node = display.newNode() node:setTouchEnable(true) -- don't add this node to any container node.
in this case 'clean' event never have chance to send, LuaEventNode will leak.
It can't be solved now, because we don’t want to modify the class 'Node'. Don‘t use a node as this.
Implement LuaEventNode as a Node Component may be a good idea~~ it also can increase getLuaNodeByNode performance. in target finding phrase when TOUCH DOWN. this function is heavily called by onTouchesBegan through checkTouchableNode->getParent(). if 200 touchable node on screen, the fps drop down significantly!