diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h index d075cb8431..2dc67c2566 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 e413badf97..22dfa62edd 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