Fixed all the NSAutoreleasePool issues on Mac OS X 10.6.

This commit is contained in:
Pietro Gagliardi 2014-06-07 19:56:51 -04:00
parent 70d7f9fb2a
commit bc848f5c40
3 changed files with 6 additions and 2 deletions

View File

@ -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;
}

View File

@ -30,7 +30,7 @@
// because the only way to make a new NSControl/NSView is with a frame (it gets overridden later)
NSRect dummyRect;
// this can be called before our NSApp is created, so keep a pool
// this can be called before our NSApp is created, so keep a pool to keep 10.6 happy
id toNSString(char *str)
{
NSAutoreleasePool *pool;

View File

@ -1,7 +1,6 @@
MAC OS X:
- NSComboBox scans the entered text to see if it matches one of the items and returns the index of that item if it does; find out how to suppress this so that it returns -1 unless the item was chosen from the list (like the other platforms)
- asked: http://stackoverflow.com/questions/23046414/cocoa-how-do-i-get-nscombobox-indexofselecteditem-to-return-1-if-the-user-m
- 10.6 also spits a bunch of NSNoAutoreleasePool() debug log messages even though I thoguht I had everything in an NSAutoreleasePool...
- make sure Areas get keyboard focus when clicking outside the actual Area space on Mac OS X
WINDOWS: