summaryrefslogtreecommitdiff
path: root/frontends/cocoa/NetsurfApp.m
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/cocoa/NetsurfApp.m')
-rw-r--r--frontends/cocoa/NetsurfApp.m18
1 files changed, 11 insertions, 7 deletions
diff --git a/frontends/cocoa/NetsurfApp.m b/frontends/cocoa/NetsurfApp.m
index 7d49e0b51..1ecdc51a7 100644
--- a/frontends/cocoa/NetsurfApp.m
+++ b/frontends/cocoa/NetsurfApp.m
@@ -98,18 +98,22 @@ static void die(const char * const error)
- (void) run
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
+
+
+ @autoreleasepool {
[self finishLaunching];
[self loadOptions];
+ }
while (!cocoa_done) {
- [pool release];
- pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
+
NSEvent *event =
- [self nextEventMatchingMask: NSAnyEventMask
+ [self nextEventMatchingMask: NSEventMaskAny
untilDate: [NSDate distantFuture]
inMode: NSDefaultRunLoopMode
dequeue: YES];
@@ -117,12 +121,13 @@ static void die(const char * const error)
[self sendEvent: event];
[self updateWindows];
}
+ }
}
[self saveOptions];
- [pool release];
+ }
}
-(void) terminate: (id)sender
@@ -130,7 +135,7 @@ static void die(const char * const error)
[[NSNotificationCenter defaultCenter] postNotificationName:NSApplicationWillTerminateNotification object:self];
cocoa_done = true;
- [self postEvent: [NSEvent otherEventWithType: NSApplicationDefined
+ [self postEvent: [NSEvent otherEventWithType: NSEventTypeApplicationDefined
location: NSZeroPoint
modifierFlags: 0
timestamp: 0
@@ -204,7 +209,6 @@ static NSApplication *cocoa_prepare_app( void )
NSString *mainNibName = [infoDictionary objectForKey:@"NSMainNibFile"];
NSNib *mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:[NSBundle mainBundle]];
[mainNib instantiateNibWithOwner:NSApp topLevelObjects:nil];
- [mainNib release];
return NSApp;
}