From bc848f5c4078b999dbe6ef1cd90e16290a0d1c3a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 7 Jun 2014 19:56:51 -0400 Subject: Fixed all the NSAutoreleasePool issues on Mac OS X 10.6. --- delegateuitask_darwin.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'delegateuitask_darwin.m') diff --git a/delegateuitask_darwin.m b/delegateuitask_darwin.m index 39bdaa1..d2e6f4f 100644 --- a/delegateuitask_darwin.m +++ b/delegateuitask_darwin.m @@ -126,6 +126,10 @@ id windowGetContentView(id window) BOOL initCocoa(id appDelegate) { + // on 10.6 the -[NSApplication setDelegate:] method complains if we don't have one + NSAutoreleasePool *pool; + + pool = [NSAutoreleasePool new]; dummyRect = NSMakeRect(0, 0, 100, 100); initAreaClass(); [ourApplication sharedApplication]; // makes NSApp an object of type ourApplication @@ -133,6 +137,7 @@ BOOL initCocoa(id appDelegate) return NO; [NSApp activateIgnoringOtherApps:YES]; // TODO actually do C.NO here? Russ Cox does YES in his devdraw; the docs say the Finder does NO [NSApp setDelegate:appDelegate]; + [pool release]; return YES; } -- cgit v1.2.3