diff --git a/Classes/SBDocument.m b/Classes/SBDocument.m index f00d2be..4e082f7 100755 --- a/Classes/SBDocument.m +++ b/Classes/SBDocument.m @@ -225,16 +225,14 @@ }); while (!done) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - @try { - NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES]; - if (event) [NSApp sendEvent:event]; - } - @catch (NSException *localException) { - NSLog(@"Exception thrown during save: %@", localException); - } - @finally { - [pool drain]; + @autoreleasepool { + @try { + NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES]; + if (event) [NSApp sendEvent:event]; + } + @catch (NSException *localException) { + NSLog(@"Exception thrown during save: %@", localException); + } } }