OGRE与MFC结合产生的内存泄露问题
2011-06-18 19:02
316 查看
http://blog.csdn.net/kamaliang/archive/2009/02/12/3883340.aspx
http://89.151.96.106/forums/viewtopic.php?f=2&t=11973
在调试的时候,关闭程序会出现内存泄露提示。
其实内存没有泄露,主要还是DLL加载顺序的问题,MFC的DLL先退出而OGRE的DLL没有退出,所以MFC会认为内存泄露,其实没有泄露,用VLD也是检测不到的。
要想看不到MFC讨厌的内存泄露提示信息的话,按下面这样做:
i) in the General tab, switch "Use MFC in a shared DLL" to "Use Standard Windows Libraries"
ii) in the C/C++/Preprocessor tab, add _AFXDLL to the preprocessor definitions
iii) in the Linker/Input tab, add mfc80d.lib anywhere before OgreMain_d.lib
最后,把字符集改为多字节字符
调试的时候就不会出现MFC的内存泄露提示啦。
http://89.151.96.106/forums/viewtopic.php?f=2&t=11973
在调试的时候,关闭程序会出现内存泄露提示。
其实内存没有泄露,主要还是DLL加载顺序的问题,MFC的DLL先退出而OGRE的DLL没有退出,所以MFC会认为内存泄露,其实没有泄露,用VLD也是检测不到的。
要想看不到MFC讨厌的内存泄露提示信息的话,按下面这样做:
i) in the General tab, switch "Use MFC in a shared DLL" to "Use Standard Windows Libraries"
ii) in the C/C++/Preprocessor tab, add _AFXDLL to the preprocessor definitions
iii) in the Linker/Input tab, add mfc80d.lib anywhere before OgreMain_d.lib
最后,把字符集改为多字节字符
调试的时候就不会出现MFC的内存泄露提示啦。
相关文章推荐
- 关于 MFC 中 CString 内存泄露的问题
- 160715、在web.xml中注册IntrospectorCleanupListener解决Quartz等框架可能产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- 关于 MFC 中 CString 内存泄露的问题
- view.post执行时机以及可能产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- Ogre与MFC结合时的内存泄漏问题
- MFC中onctlcolor函数返回的画刷导致的内存资源泄露问题
- Android 开发使用MVP产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决spring mvc等框架可能产生的内存泄露问题
- 线程没有正常结束产生的内存泄露问题的解决
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- MFC内存泄露问题
- MFCLinkCtrl 的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- mfc非模态子对话框调用内存泄露问题