summaryrefslogtreecommitdiff
path: root/zen/debug_memory_leaks.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:36 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:36 +0200
commitecb1524f8da7901338b263384fed3c612f117b4c (patch)
treee7e06423fe27ea5ab45f27fc4b39ae597ba72490 /zen/debug_memory_leaks.cpp
parent5.10 (diff)
downloadFreeFileSync-ecb1524f8da7901338b263384fed3c612f117b4c.tar.gz
FreeFileSync-ecb1524f8da7901338b263384fed3c612f117b4c.tar.bz2
FreeFileSync-ecb1524f8da7901338b263384fed3c612f117b4c.zip
5.11
Diffstat (limited to 'zen/debug_memory_leaks.cpp')
-rw-r--r--zen/debug_memory_leaks.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/zen/debug_memory_leaks.cpp b/zen/debug_memory_leaks.cpp
index 8774d16f..990f2ec7 100644
--- a/zen/debug_memory_leaks.cpp
+++ b/zen/debug_memory_leaks.cpp
@@ -5,7 +5,7 @@
// **************************************************************************
//-----------Memory Leak Detection--------------------------
-//Usage: just include this file into a Visual Studio project
+//Usage: just include this file into a Visual Studio project
#ifndef NDEBUG
@@ -20,10 +20,9 @@ struct OnStartup
{
OnStartup()
{
- //note: wxWidgets also "activates" leak detection in the usual buggy way: it sets incomplete flags and incorrectly overwrites them rather than appending -> luckily it still seems to work!
+ //note: wxWidgets also activates leak detection in "src/common/init.cpp" using a macro that is equivalent to:
int flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
- flags |= _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF;
- _CrtSetDbgFlag(flags);
+ _CrtSetDbgFlag(flags | _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
}
} dummy;
bgstack15