Skip to main content
gamedev.net
🔒 Locked

Memory Leaks

Started by Greg K 1 reply 650+ views
aboeing
aboeing
#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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.