diff --git a/src/cocoa/listbox.mm b/src/cocoa/listbox.mm index 5e9239d031..2f35c368cd 100644 --- a/src/cocoa/listbox.mm +++ b/src/cocoa/listbox.mm @@ -17,6 +17,7 @@ #endif //WX_PRECOMP #include "wx/cocoa/string.h" +#include "wx/cocoa/autorelease.h" #include "wx/cocoa/NSTableDataSource.h" #import @@ -37,6 +38,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID winid, const wxValidator& validator, const wxString& name) { + wxAutoNSAutoreleasePool pool; if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; diff --git a/src/cocoa/statline2.mm b/src/cocoa/statline2.mm index 15472fb1ff..283ca293a8 100644 --- a/src/cocoa/statline2.mm +++ b/src/cocoa/statline2.mm @@ -15,6 +15,8 @@ #endif //WX_PRECOMP #include "wx/statline.h" +#include "wx/cocoa/autorelease.h" + #import IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl) @@ -28,6 +30,7 @@ bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid, long style, const wxString& name) { + wxAutoNSAutoreleasePool pool; if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) return false; SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]); diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 4b3373a4b7..1ce1295c50 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -568,6 +568,7 @@ void wxWindowCocoa::DoSetSize(int x, int y, int width, int height, int sizeFlags void wxWindowCocoa::DoMoveWindow(int x, int y, int width, int height) { + wxAutoNSAutoreleasePool pool; // wxLogDebug("wxWindow=%p::DoMoveWindow(%d,%d,%d,%d)",this,x,y,width,height); NSView *nsview = GetNSViewForSuperview();