Skip to content

Instantly share code, notes, and snippets.

@tolmasky
Created December 17, 2009 05:08
Show Gist options
  • Save tolmasky/258538 to your computer and use it in GitHub Desktop.
Save tolmasky/258538 to your computer and use it in GitHub Desktop.
-(void)run {
NSAutoreleasePool *pool=[NSAutoreleasePool new];
[self finishLaunching];
[pool release];
_isRunning=YES;
do {
pool = [NSAutoreleasePool new];
NSEvent *event;
event=[self nextEventMatchingMask:NSAnyEventMask
untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES];
NS_DURING
[self sendEvent:event];
NS_HANDLER
[self reportException:localException];
NS_ENDHANDLER
[self _checkForReleasedWindows];
[self _checkForTerminate];
[pool release];
}while(_isRunning);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment