X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d48b06bd9039597545de9a862501d57c5f9ec1ea..04fa04d8067d235ab45b5bc05b65f0679634b541:/src/os2/app.cpp diff --git a/src/os2/app.cpp b/src/os2/app.cpp index ed071ed89e..8e98b984bd 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -235,9 +235,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv) // Some people may wish to use this, but // probably it shouldn't be here by default. -#ifdef __WXDEBUG__ // wxRedirectIOToConsole(); -#endif wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100); @@ -388,8 +386,7 @@ bool wxApp::RegisterWindowClasses( HAB vHab ) // void wxApp::CleanUp() { - delete[] wxBuffer; - wxBuffer = NULL; + wxDELETEA(wxBuffer); // // PM-SPECIFIC CLEANUP @@ -416,8 +413,7 @@ void wxApp::CleanUp() // TODO: ::DeleteObject( wxDisableButtonBrush ); } - delete wxWinHandleHash; - wxWinHandleHash = NULL; + wxDELETE(wxWinHandleHash); // Delete Message queue if (wxTheApp->m_hMq) @@ -504,66 +500,6 @@ void wxApp::OnQueryEndSession( wxCloseEvent& rEvent ) } } // end of wxApp::OnQueryEndSession -// -// Yield to incoming messages -// -bool wxApp::DoYield(bool onlyIfNeeded, long eventsToProcess) -{ - if ( m_isInsideYield ) - { - if ( !onlyIfNeeded ) - { - wxFAIL_MSG( _T("wxYield() called recursively") ); - } - - return false; - } - - HAB vHab = 0; - QMSG vMsg; - - // - // Disable log flushing from here because a call to wxYield() shouldn't - // normally result in message boxes popping up &c - // - wxLog::Suspend(); - - m_isInsideYield = true; - m_eventsToProcessInsideYield = eventsToProcess; - - // - // We want to go back to the main message loop - // if we see a WM_QUIT. (?) - // - wxEventLoopGuarantor dummyLoopIfNeeded; - while (::WinPeekMsg(vHab, &vMsg, (HWND)NULL, 0, 0, PM_NOREMOVE) && vMsg.msg != WM_QUIT) - { - // TODO: implement event filtering using the eventsToProcess mask - -#if wxUSE_THREADS - wxMutexGuiLeaveOrEnter(); -#endif // wxUSE_THREADS - if (!wxTheApp->Dispatch()) - break; - } - - // - // If they are pending events, we must process them. - // - if (wxTheApp) - wxTheApp->ProcessPendingEvents(); - - HandleSockets(); - - // - // Let the logs be flashed again - // - wxLog::Resume(); - m_isInsideYield = false; - - return true; -} // end of wxYield - int wxApp::AddSocketHandler(int handle, int mask, void (*callback)(void*), void * gsock) {