Win32平台
1.mfc
#include <stdlib.h>
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
//方法中
_CrtDumpMemoryLeaks()
2.普通C应用
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
方法中
_CrtDumpMemoryLeaks()3.VDL
待续,详细的换完新电脑补上
Win32平台下的内存泄漏检测:MFC与普通C应用对比
846

被折叠的 条评论
为什么被折叠?



