关于vs编译器的一个crt宏
#define WIN32_LEAN_AND_MEAN
#define _CRTDBG_MAP_ALLOC
#include "stdafx.h"
#include <stdlib.h>
#include <crtdbg.h>
int _tmain(int argc, _TCHAR* argv[])
{
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF);
char* test = new char[100];
return 0;
}
这是按照网上的一个测试例子,但是没在output那现在出信息,用的也是F5,也存在内存溢出
不知道是不是分数不够,上次很少人进来帮回答? 内存泄露检测 Visual?Studio
[解决办法]
VS2008我的就有啊
Detected memory leaks!
Dumping objects ->
{67} normal block at 0x00314D38, 100 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.