Replaced some NSAutoreleasepool with @autoreleasepool.

This commit is contained in:
Damiano Galassi committed 2014-10-23 14:23:41 +02:00
1 parent 2303dfb455
commit d380b827ef
1 file changed
+8 -10
+8 -10
View File
@@ -225,16 +225,14 @@
}); });
while (!done) { while (!done) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @autoreleasepool {
@try { @try {
NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES]; NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES];
if (event) [NSApp sendEvent:event]; if (event) [NSApp sendEvent:event];
} }
@catch (NSException *localException) { @catch (NSException *localException) {
NSLog(@"Exception thrown during save: %@", localException); NSLog(@"Exception thrown during save: %@", localException);
} }
@finally {
[pool drain];
} }
} }