X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/065e208ec09e3d08d51d9604497f92f53c210f93..dff4be9392001bfd15f9833c7c767ed415f4ae2c:/src/cocoa/choice.mm diff --git a/src/cocoa/choice.mm b/src/cocoa/choice.mm index 401e7af1f7..ba97699d8e 100644 --- a/src/cocoa/choice.mm +++ b/src/cocoa/choice.mm @@ -18,6 +18,7 @@ #endif //WX_PRECOMP #include "wx/cocoa/string.h" +#include "wx/cocoa/autorelease.h" #import #import @@ -56,6 +57,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID winid, const wxValidator& validator, const wxString& name) { + wxAutoNSAutoreleasePool pool; if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; @@ -158,6 +160,7 @@ int wxChoice::GetCount() const wxString wxChoice::GetString(int n) const { + wxAutoNSAutoreleasePool pool; return wxStringWithNSString([(NSPopUpButton*)m_cocoaNSView itemTitleAtIndex:n]); } @@ -232,6 +235,7 @@ wxClientData* wxChoice::DoGetItemClientObject(int n) const void wxChoice::SetSelection(int n) { + wxAutoNSAutoreleasePool pool; [(NSPopUpButton*)m_cocoaNSView selectItemAtIndex:n]; }