调试前将
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
加到头文件中
然后将_CrtDumpMemoryLeaks()加到函数出口或者程序结束处,运行即可在output中看到相关内存泄漏具体信息。
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
加到头文件中
然后将_CrtDumpMemoryLeaks()加到函数出口或者程序结束处,运行即可在output中看到相关内存泄漏具体信息。