summaryrefslogtreecommitdiffstats
path: root/source/MemoryLeak.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/MemoryLeak.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/MemoryLeak.h b/source/MemoryLeak.h
new file mode 100644
index 000000000..6ac06a302
--- /dev/null
+++ b/source/MemoryLeak.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#ifdef _WIN32
+
+#ifdef _DEBUG
+
+#define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
+#include <crtdbg.h>
+
+#ifndef DEBUG_NEW
+#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
+#define new DEBUG_NEW
+#endif
+
+#endif
+
+#endif