]> git.saurik.com Git - wxWidgets.git/commitdiff
overriding to allocate an outer autorelease pool
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 30 Sep 2009 18:25:33 +0000 (18:25 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 30 Sep 2009 18:25:33 +0000 (18:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/app.h
src/osx/carbon/app.cpp

index d075cb84315bdd51999b55bf03c410b4708924ad..2dc67c2566c8713e34b76cdc17a3823113a1fefa 100644 (file)
@@ -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();
 
index e413badf9713f0c125793b9afd181ff6ff8cbc79..22dfa62eddb3ca83ca48d6e7e68ec0b3b74e851d 100644 (file)
@@ -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