]> git.saurik.com Git - wxWidgets.git/commitdiff
Add a couple of wxAutoNSAutoreleasePool in some key spots where Cocoa itself does...
authorDavid Elliott <dfe@tgwbd.org>
Tue, 17 Jul 2007 05:31:49 +0000 (05:31 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Tue, 17 Jul 2007 05:31:49 +0000 (05:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/window.mm

index 6b5c0105325d835d85a572e5019d36e4822e2f87..69689cbf725b957454230852e58c8af9267318f4 100644 (file)
@@ -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)
     {