From b0a207df87370ec2f3a0f2b8aeba1bb6776cfcf2 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Tue, 17 Jul 2007 05:31:49 +0000 Subject: [PATCH] Add a couple of wxAutoNSAutoreleasePool in some key spots where Cocoa itself does a number of autoreleases. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/window.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 6b5c010532..69689cbf72 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -380,6 +380,9 @@ wxWindow::~wxWindow() void wxWindowCocoa::CocoaAddChild(wxWindowCocoa *child) { + // Pool here due to lack of one during wx init phase + wxAutoNSAutoreleasePool pool; + NSView *childView = child->GetNSViewForSuperview(); wxASSERT(childView); @@ -1246,6 +1249,9 @@ void wxCocoaTrackingRectManager::StopSynthesizingEvents() void wxCocoaTrackingRectManager::BuildTrackingRect() { + // Pool here due to lack of one during wx init phase + wxAutoNSAutoreleasePool pool; + wxASSERT_MSG(!m_isTrackingRectActive, wxT("Tracking rect was not cleared")); if([m_window->GetNSView() window] != nil) { -- 2.45.2