Wednesday, May 30, 2007

VC simple mem leak detection code

Add these lines into header:
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
Call this function @ entry point
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );

No comments: