X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e9eea73bcbb299dbe6ec0c3c3c861799f6cc6b6..3d640cfc403ebc5cd96c95f325057b709550c4d1:/src/common/init.cpp diff --git a/src/common/init.cpp b/src/common/init.cpp index 39874736bf..407fe5cb3e 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -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); @@ -396,6 +389,7 @@ int wxEntryReal(int& argc, wxChar **argv) wxTRY { + // app initialization if ( !wxTheApp->CallOnInit() ) {