mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-08-15 11:27:35 +00:00
[ Tim Douglas <timdoug@gmail.com> ]
use an auto release pool around "Preferences..." menu item creation on Mac OS X
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user