码迷,mamicode.com
首页 > 编程语言 > 详细

C++内存泄漏及检测工具详解

时间:2015-03-08 22:57:20      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:

#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;
}

 

C++内存泄漏及检测工具详解

标签:

原文地址:http://www.cnblogs.com/chunyou128/p/4322430.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!