From 51036b441d580061db2afa4f58cdb56b77b146cb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Sep 2004 19:10:42 +0000 Subject: [PATCH] added a missing delete which resulted in a small memory leak on each wxExecute() (fixes 926802) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/app.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/msw/app.cpp b/src/msw/app.cpp index f0d2197704..602be108da 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -193,6 +193,9 @@ void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig) // the other windows reenabled, the activation is going to return to the // window which had had it before data->winActive->Destroy(); + + // also delete the temporary data object itself + delete data; } bool wxGUIAppTraits::DoMessageFromThreadWait() @@ -799,3 +802,33 @@ terminate the program,\r\n\ } #endif // wxUSE_EXCEPTIONS + +// ---------------------------------------------------------------------------- +// deprecated event loop functions +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_4 + +#include "wx/evtloop.h" + +void wxApp::DoMessage(WXMSG *pMsg) +{ + wxEventLoop *evtLoop = wxEventLoop::GetActive(); + if ( evtLoop ) + evtLoop->ProcessMessage(pMsg); +} + +bool wxApp::DoMessage() +{ + wxEventLoop *evtLoop = wxEventLoop::GetActive(); + return evtLoop ? evtLoop->Dispatch() : false; +} + +bool wxApp::ProcessMessage(WXMSG* pMsg) +{ + wxEventLoop *evtLoop = wxEventLoop::GetActive(); + return evtLoop && evtLoop->PreProcessMessage(pMsg); +} + +#endif // WXWIN_COMPATIBILITY_2_4 + -- 2.45.2