Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
msvc: add a compile-time flag to allow detailed heap debugging
[gitweb.git]
/
compat
/
mingw.c
diff --git
a/compat/mingw.c
b/compat/mingw.c
index c063ae62be125f33418684039bd3fbc21433b83b..667285887a0c536f4b33fcb8cfa7451f23936b69 100644
(file)
--- a/
compat/mingw.c
+++ b/
compat/mingw.c
@@
-2411,6
+2411,12
@@
int wmain(int argc, const wchar_t **wargv)
trace2_initialize_clock();
+#ifdef _MSC_VER
+#ifdef USE_MSVC_CRTDBG
+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+#endif
+#endif
+
maybe_redirect_std_handles();
/* determine size of argv and environ conversion buffer */