我在我的项目中使用了lua,然后使用了一款叫做Visual Leak Detector的内存泄露检测工具,我在lua中使用ccp(x,y)和getContentSize()好像会造成内存泄露!
比如:local actionScale=CCMoveTo:create(0.2,ccp(self.P_items:getPositionX() - self.P_items:getContentSize().width,self.P_items:getPositionY()))
---------- Block 67459 at 0x03047BA0: 8 bytes ----------
Call Stack:
HINT: The following call stack may be incomplete. Setting “StackWalkMethod”
in the vld.ini file to “safe” instead of “fast” may result in a more
complete stack trace.
e:\cocos2d-x\cocos2d-x-2.2\scripting\lua\cocos2dx_support\luacocos2d.cpp (5410): card.win32.exe!tolua_Cocos2d_ccp00 + 0x7 bytes
0x5EABF89F (File and line number not available): lua51.dll!lua_close + 0x55FF bytes
0x00010661 (File and line number not available): (Module name unavailable)!(Function name unavailable)
Data:
00 00 80 3F 00 00 00 00
Call Stack:
HINT: The following call stack may be incomplete. Setting “StackWalkMethod”
in the vld.ini file to “safe” instead of “fast” may result in a more
complete stack trace.
e:\cocos2d-x\cocos2d-x-2.2\scripting\lua\cocos2dx_support\luacocos2d.cpp (14582): card.win32.exe!tolua_Cocos2d_CCNode_getContentSize00 + 0x7 bytes
0x5EABF89F (File and line number not available): lua51.dll!lua_close + 0x55FF bytes
0x00010661 (File and line number not available): (Module name unavailable)!(Function name unavailable)
Data:
00 00 F0 42 00 00 A0 41 …B…A …
