From ada175836e7b9e456b7f32d82bfb5f6b21d5608d Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 30 Sep 2009 18:25:33 +0000 Subject: [PATCH] overriding to allocate an outer autorelease pool git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/app.h | 2 -- src/osx/carbon/app.cpp | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h index d075cb8..2dc67c2 100644 --- a/include/wx/osx/app.h +++ b/include/wx/osx/app.h @@ -50,9 +50,7 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase virtual bool OnInitGui(); #endif // wxUSE_GUI -#ifdef __WXOSX_IPHONE__ virtual int OnRun(); -#endif virtual bool ProcessIdle(); diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index e413bad..22dfa62 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -866,6 +866,20 @@ bool wxApp::ProcessIdle() return wxAppBase::ProcessIdle(); } +#if wxOSX_USE_COCOA_OR_CARBON + +int wxApp::OnRun() +{ + wxMacAutoreleasePool pool; + return wxAppBase::OnRun(); +} + +#else + +// iPhone version in utils.mm + +#endif + #if wxOSX_USE_CARBON bool wxApp::DoInitGui() { @@ -939,6 +953,7 @@ void wxApp::DoCleanUp() void wxApp::CleanUp() { + wxMacAutoreleasePool autoreleasepool; #if wxUSE_TOOLTIPS wxToolTip::RemoveToolTips() ; #endif -- 2.7.4