This topic is now archived and is closed to further replies.

Greg K

Memory Leaks

Recommended Posts

#include <crtdbg.h>
#define new new(_NORMAL_BLOCK,__FILE__, __LINE__)
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); // Get current flag
flag |= _CRTDBG_LEAK_CHECK_DF; // Turn on leak-checking bit
_CrtSetDbgFlag(flag); // Set flag to the new value

someone should put this in the forum faq

Share this post

Link to post
Share on other sites