]> git.saurik.com Git - wxWidgets.git/commitdiff
guaranteeing autorelease pools for overridden OnRun on OSX
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 14 Apr 2009 19:54:01 +0000 (19:54 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 14 Apr 2009 19:54:01 +0000 (19:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/test.cpp

index 667c2c0c3055e21bb510e0e323a0d772b14b2912..2f7f71903cd0fa024d8d14824ce7d9c35e853932 100644 (file)
     #include "wx/msw/msvcrt.h"
 #endif
 
+#ifdef __WXOSX__
+    #include "wx/osx/private.h"
+#endif
+
 using namespace std;
 
 using CppUnit::Test;
@@ -436,6 +440,13 @@ static Test *GetTestByName(const wxString& name)
 //
 int TestApp::OnRun()
 {
+#if wxUSE_GUI
+#ifdef __WXOSX__
+    // make sure there's always an autorelease pool ready
+    wxMacAutoreleasePool autoreleasepool;
+#endif
+#endif
+
 #if wxUSE_LOG
     // Switch off logging unless --verbose
     bool verbose = wxLog::GetVerbose();