最近在做视频处理方面的东西,做到实时处理,内存泄漏是很致命的。网上找了好多方法,试了一种比较好的,在此分享一下。
#ifdef _DEBUG#endif#define _CRTDBG_MAP_ALLOC#include<stdlib.h>#include<crtdbg.h>
_CrtDumpMemoryLeaks();
Detected memory leaks!
Dumping objects ->
D:\...\*****.cpp(1463) : {8244} normal block at 0x01AA84B8, 512 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
原文地址:http://www.cnblogs.com/tianya2543/p/3709578.html