aboutsummaryrefslogtreecommitdiff
path: root/src/win/HeapDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/win/HeapDebug.cpp')
-rw-r--r--src/win/HeapDebug.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/win/HeapDebug.cpp b/src/win/HeapDebug.cpp
new file mode 100644
index 00000000..6ec1ffcc
--- /dev/null
+++ b/src/win/HeapDebug.cpp
@@ -0,0 +1,11 @@
+#include "cru/win/WinPreConfig.hpp"
+
+#include "cru/platform/HeapDebug.hpp"
+
+#include <crtdbg.h>
+
+namespace cru::platform {
+void SetupHeapDebug() {
+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+}
+}