X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb896a322a2ed53d393ee738765ddd3f72cee004..8fc821cccfe0bb436095500d6f8e942bddf4412d:/src/cocoa/NSMenu.mm diff --git a/src/cocoa/NSMenu.mm b/src/cocoa/NSMenu.mm index a930b8a4de..4508915289 100644 --- a/src/cocoa/NSMenu.mm +++ b/src/cocoa/NSMenu.mm @@ -24,6 +24,7 @@ #include "wx/cocoa/NSMenu.h" #include "wx/cocoa/ObjcPose.h" +#include "wx/cocoa/autorelease.h" #import #import @@ -53,6 +54,7 @@ WX_IMPLEMENT_POSER(wxPoserNSMenu); // ============================================================================ bool wxCocoaNSMenu::CocoaCreate(const wxString &title) { + wxAutoNSAutoreleasePool pool; wxLogDebug("CocoaCreate: "+title); m_cocoaNSMenu = [[NSMenu alloc] initWithTitle: [NSString stringWithCString: title.c_str()]]; return true;