X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a3dde0d44c43bc70a1e9791381ada04b4953a5d..424da8bdb9f05243d8888d78a56ab0cc3f615a6c:/src/palmos/app.cpp diff --git a/src/palmos/app.cpp b/src/palmos/app.cpp index cfc5e1e70a..8ff97b1088 100644 --- a/src/palmos/app.cpp +++ b/src/palmos/app.cpp @@ -100,11 +100,6 @@ void *wxGUIAppTraits::BeforeChildWaitLoop() return NULL; } -void wxGUIAppTraits::AlwaysYield() -{ - wxYield(); -} - void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig) { } @@ -120,10 +115,12 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const return wxPORT_PALMOS; } +#if wxUSE_TIMER wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) { return new wxPalmOSTimerImpl(timer); }; +#endif // wxUSE_TIMER wxEventLoopBase* wxGUIAppTraits::CreateEventLoop() { @@ -142,7 +139,6 @@ int wxApp::m_nCmdShow = 0; IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) EVT_END_SESSION(wxApp::OnEndSession) EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession) END_EVENT_TABLE() @@ -213,8 +209,7 @@ void wxApp::CleanUp() // unregister the classes now UnregisterWindowClasses(); - delete wxWinHandleHash; - wxWinHandleHash = NULL; + wxDELETE(wxWinHandleHash); } // ---------------------------------------------------------------------------- @@ -228,28 +223,27 @@ wxApp::wxApp() wxApp::~wxApp() { + wxChar **argv_tmp; + argv_tmp = argv; + // src/palmos/main.cpp // our cmd line arguments are allocated inside wxEntry(HINSTANCE), they // don't come from main(), so we have to free them - while ( argc ) { // m_argv elements were allocated by wxStrdup() - free(argv[--argc]); + if (argv_tmp[--argc]) { + free((void *)(argv_tmp[--argc])); + } } - // but m_argv itself -- using new[] - delete [] argv; + delete [] argv_tmp; + //argv = NULL; } // ---------------------------------------------------------------------------- // wxApp idle handling // ---------------------------------------------------------------------------- -void wxApp::OnIdle(wxIdleEvent& event) -{ - wxAppBase::OnIdle(event); -} - void wxApp::WakeUpIdle() { } @@ -285,13 +279,6 @@ int wxApp::GetComCtl32Version() return 0; } -// Yield to incoming messages - -bool wxApp::Yield(bool onlyIfNeeded) -{ - return true; -} - #if wxUSE_EXCEPTIONS // ----------------------------------------------------------------------------