diff options
Diffstat (limited to 'zen/debug_memory_leaks.cpp')
-rw-r--r-- | zen/debug_memory_leaks.cpp | 7 |
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; |