X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aaf1bbfd62a0297da30d2ac01f6e30592a3d11e0..f773e9b0bbfd051a4ae316461fd241230c87e39f:/src/common/memory.cpp diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 0d67e157e0..9e6c3beaed 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -892,6 +892,9 @@ public: MemoryCriticalSection() { memSectionOk = true; } + ~MemoryCriticalSection() { + memSectionOk = false; + } }; class MemoryCriticalSectionLocker @@ -910,7 +913,7 @@ private: bool m_locked; }; - static MemoryCriticalSection memLocker; +static MemoryCriticalSection memLocker; #endif @@ -1134,11 +1137,11 @@ void wxTraceLevel(int, const wxChar * ...) } //---------------------------------------------------------------------------- -// Final cleanup after all global objects in all files have been destructed +// Final cleanup after all global objects in all files have been destroyed //---------------------------------------------------------------------------- // Don't set it to 0 by dynamic initialization -// Some compilers will realy do the asignment later +// Some compilers will really do the assignment later // All global variables are initialized to 0 at the very beginning, and this is just fine. int wxDebugContextDumpDelayCounter::sm_count; @@ -1153,7 +1156,7 @@ void wxDebugContextDumpDelayCounter::DoDump() } // Even if there is nothing else, make sure that there is at -// least one clenup counter object +// least one cleanup counter object static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_One; #endif // (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT