From 8b7b1a57483e51e325017dcbf35f75b578ae775c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 14 Apr 2009 19:54:01 +0000 Subject: [PATCH] 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 --- tests/test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test.cpp b/tests/test.cpp index 667c2c0c30..2f7f71903c 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -41,6 +41,10 @@ #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(); -- 2.49.0