X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47d67540a017101b3e46abe9ef0f55914d8de37e..3bcf00abd7aa6b515e776e18b3e295467a693959:/src/stubs/app.cpp diff --git a/src/stubs/app.cpp b/src/stubs/app.cpp index 3b4f618bb6..b04a01bbe2 100644 --- a/src/stubs/app.cpp +++ b/src/stubs/app.cpp @@ -33,10 +33,6 @@ #include "wx/resource.h" #endif -#if wxUSE_POSTSCRIPT -#include "wx/postscrp.h" -#endif - #include extern char *wxBuffer; @@ -61,31 +57,27 @@ bool wxApp::Initialize() wxBuffer = new char[BUFSIZ + 512]; #endif -#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT +/* No longer used +#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT streambuf* sBuf = new wxDebugStreamBuf; ostream* oStr = new ostream(sBuf) ; wxDebugContext::SetStream(oStr, sBuf); - #endif +*/ wxClassInfo::InitializeClasses(); wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING); wxTheColourDatabase->Initialize(); + + wxInitializeStockLists(); wxInitializeStockObjects(); #if wxUSE_WX_RESOURCES wxInitializeResourceSystem(); #endif - // For PostScript printing -#if wxUSE_POSTSCRIPT - wxInitializePrintSetupData(); - wxThePrintPaperDatabase = new wxPrintPaperDatabase; - wxThePrintPaperDatabase->CreateDatabase(); -#endif - wxBitmap::InitStandardHandlers(); wxModule::RegisterModules(); @@ -121,12 +113,6 @@ void wxApp::CleanUp() delete wxTheColourDatabase; wxTheColourDatabase = NULL; -#if wxUSE_POSTSCRIPT - wxInitializePrintSetupData(FALSE); - delete wxThePrintPaperDatabase; - wxThePrintPaperDatabase = NULL; -#endif - wxBitmap::CleanUpHandlers(); delete[] wxBuffer; @@ -134,6 +120,23 @@ void wxApp::CleanUp() wxClassInfo::CleanUpClasses(); + delete wxTheApp; + wxTheApp = NULL; + +#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT + // At this point we want to check if there are any memory + // blocks that aren't part of the wxDebugContext itself, + // as a special case. Then when dumping we need to ignore + // wxDebugContext, too. + if (wxDebugContext::CountObjectsLeft() > 0) + { + wxTrace("There were memory leaks.\n"); + wxDebugContext::Dump(); + wxDebugContext::PrintStatistics(); + } +// wxDebugContext::SetStream(NULL, NULL); +#endif + // do it as the very last thing because everything else can log messages wxLog::DontCreateOnDemand(); // do it as the very last thing because everything else can log messages @@ -189,23 +192,6 @@ int wxEntry( int argc, char *argv[] ) wxApp::CleanUp(); - delete wxTheApp; - wxTheApp = NULL; - -#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT - // At this point we want to check if there are any memory - // blocks that aren't part of the wxDebugContext itself, - // as a special case. Then when dumping we need to ignore - // wxDebugContext, too. - if (wxDebugContext::CountObjectsLeft() > 0) - { - wxTrace("There were memory leaks.\n"); - wxDebugContext::Dump(); - wxDebugContext::PrintStatistics(); - } - wxDebugContext::SetStream(NULL, NULL); -#endif - return retValue; }; @@ -340,7 +326,7 @@ bool wxApp::SendIdleEvents(wxWindow* win) if (event.MoreRequested()) needMore = TRUE; - wxNode* node = win->GetChildren()->First(); + wxNode* node = win->GetChildren().First(); while (node) { wxWindow* win = (wxWindow*) node->Data();