guaranteeing autorelease pools for overridden OnRun on OSX

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2009-04-14 19:54:01 +00:00
parent aeecbca059
commit 8b7b1a5748

View File

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