]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/init.cpp
Do not realize the top level shell that acts as a parent
[wxWidgets.git] / src / common / init.cpp
index a67f723b64e2813dc9a1373506b49844fdd0c005..407fe5cb3ecb8dd948057728342bfc25ba1a659b 100644 (file)
@@ -181,6 +181,7 @@ static void ConvertArgsToUnicode(int argc, char **argv)
         gs_initData.argv[i] = wxStrdup(wxConvLocal.cMB2WX(argv[i]));
     }
 
+    gs_initData.argc = argc;
     gs_initData.argv[argc] = NULL;
 }
 
@@ -195,6 +196,7 @@ static void FreeConvertedArgs()
 
         delete [] gs_initData.argv;
         gs_initData.argv = NULL;
+        gs_initData.argc = 0;
     }
 }
 
@@ -338,16 +340,7 @@ 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
-
+    // Note: check for memory leaks is now done via wxDebugContextDumpDelayCounter
 #if wxUSE_LOG
     // and now delete the last logger as well
     delete wxLog::SetActiveTarget(NULL);