From 675b4aa878f16291ce33fced48a2bc7425f635ae Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 24 Nov 2013 14:19:41 +0000 Subject: Moved source to src --- src/MemoryLeak.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/MemoryLeak.h (limited to 'src/MemoryLeak.h') diff --git a/src/MemoryLeak.h b/src/MemoryLeak.h new file mode 100644 index 000000000..e9c0c34e3 --- /dev/null +++ b/src/MemoryLeak.h @@ -0,0 +1,19 @@ +#pragma once + +#ifdef _WIN32 + #ifdef _DEBUG + // Enable the CRT debugging features: + #define _CRTDBG_MAP_ALLOC + #include + #include + + // This works only in MSVC 2010+: + #if _MSC_VER >= 1600 + // Map the new operator + #ifndef DEBUG_NEW + #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) + #define new DEBUG_NEW + #endif // _CRTDBG_MAP_ALLOC + #endif // _MSC_VER + #endif // _DEBUG +#endif // _WIN32 -- cgit v1.2.3