]> git.saurik.com Git - wxWidgets.git/commitdiff
check memory leaks sooner, when wxLog target is still available
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 6 Aug 2003 11:33:58 +0000 (11:33 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 6 Aug 2003 11:33:58 +0000 (11:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/init.cpp

index 3cc03374bcc81d5e137d4ae883e8d3be67c2ca32..0000d789a4f28b24e6e64ab78caf7cc80561b8d1 100644 (file)
@@ -339,6 +339,16 @@ static void DoCommonPostCleanup()
     FreeConvertedArgs();
 #endif // wxUSE_UNICODE
 
+    // check for memory leaks
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+    if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
+    {
+        wxLogDebug(wxT("There were memory leaks.\n"));
+        wxDebugContext::Dump();
+        wxDebugContext::PrintStatistics();
+    }
+#endif // Debug
+
 #if wxUSE_LOG
     // and now delete the last logger as well
     delete wxLog::SetActiveTarget(NULL);
@@ -361,17 +371,6 @@ void wxEntryCleanup()
 
 
     DoCommonPostCleanup();
-
-    // check for memory leaks
-#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
-    if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
-    {
-        wxLogDebug(wxT("There were memory leaks.\n"));
-        wxDebugContext::Dump();
-        wxDebugContext::PrintStatistics();
-    }
-#endif // Debug
-
 }
 
 // ----------------------------------------------------------------------------