![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
手游开发
vgamed
这个作者很懒,什么都没留下…
展开
-
cocos2d-x 3.2 windows在程序退出时对鼠标移动事件的处理可能造成内存泄漏
cocos文档里推荐的退出方法是调用Director::getInstance()->end();这个调用发生后退出的逻辑大概是:1. Director内部标志_purgeDirectorInNextLoop置位2. 下一个DisplayLinkDirector::mainloop()里调用purgeDirector()释放关闭一切可是在Application::run原创 2014-08-27 15:47:56 · 550 阅读 · 0 评论 -
关于cocos2d-x v3.2的内存泄漏
cocos2d-x本身是没有内存泄漏的。主要的内存泄漏都是因为代码中使用了cocos studio库里的一些类和函数:所有的WidgetReader派生类都是singleton,并且其purge函数没有被调用过,有些Readers连purge函数都仅仅是在头文件中定义却没有实现!按说purge函数应该是已经被cocos 3.0抛弃了的,应该都是destroyInstance的方式。大概原创 2014-08-15 11:30:29 · 521 阅读 · 0 评论 -
cocos android下调试C/C++ crash的方法
用ndk-stack:控制台窗口输入命令行:adb原创 2014-08-15 16:58:39 · 536 阅读 · 0 评论 -
calloc memory for variable _sharedBody in physics engine not freed in cocos2d-x 3.2
#if CC_USE_PHYSICScpBody* shared = PhysicsShapeInfo::getSharedBody();if( shared )cpBodyFree( shared );#endif原创 2014-09-15 17:12:37 · 454 阅读 · 0 评论 -
calloc memory for variable _sharedBody in physics engine not freed in cocos2d-x 3.2
The method of cleaning:#if CC_USE_PHYSICScpBody* shared = PhysicsShapeInfo::getSharedBody();if( shared )cpBodyFree( shared );#endif原创 2014-09-17 09:31:38 · 346 阅读 · 0 评论 -
How to support multithread in cocos2dx
Usually, an application is separated into two parts: foreground and backgroud, where foreground is charge of drawing UI and doing UI flow controlling, backgroud is responsible for processing data logi转载 2014-11-10 14:22:57 · 1232 阅读 · 0 评论 -
cocos2d-x常用数学函数和宏
http://www.cnblogs.com/buaashine/archive/2012/11/12/2765691.html注:有些函数和宏在3.转载 2014-11-19 09:16:05 · 264 阅读 · 0 评论 -
tinyxml2 in android
data files packed in the apk cannot be read out directly through standard file operations in android. has to use FileUtils to load the file into memory first, then use XMLDocument::parse() to retrie原创 2014-12-11 11:24:54 · 452 阅读 · 0 评论