]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/window.mm
added code to free memory allocated in wxSetEnv() when it uses putenv()
[wxWidgets.git] / 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)
     {