use an auto release pool around "Preferences..." menu item creation on Mac OS X
This commit is contained in:
asvitkine
2010-01-02 22:08:51 +00:00
parent 6677e5824c
commit 5ca84603bc

View File

@@ -98,9 +98,12 @@
void prefs_init(void)
{
NSAutoreleasePool *pool;
NSMenu *appMenu;
NSMenuItem *menuItem;
pool = [[NSAutoreleasePool alloc] init];
appMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu];
menuItem = [[NSMenuItem alloc] initWithTitle:@"Preferences..." action:@selector(openPreferences:) keyEquivalent:@","];
[appMenu insertItem:menuItem atIndex:2];
@@ -108,6 +111,8 @@ void prefs_init(void)
[menuItem release];
[NSApp setDelegate:[[SheepShaverMain alloc] init]];
[pool release];
}