内存泄露

#include "stdafx.h"
#ifdef _DEBUG
#define DEBUG_CLIENTBLOCK   new( _CLIENT_BLOCK, __FILE__, __LINE__)
#else
#define DEBUG_CLIENTBLOCK
#endif
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#ifdef _DEBUG
#define new DEBUG_CLIENTBLOCK
#endif
int _tmain(int argc, _TCHAR* argv[])
{
 int* p = new int();
 _CrtDumpMemoryLeaks();
 return 0;
}

posted @ 2011-12-13 18:48  rookieeeeee  阅读(175)  评论(0编辑  收藏  举报