- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSAlert *alert = [[[NSAlert alloc] init] autorelease];
- [alert setMessageText:title];
- if (error)
- [alert setInformativeText:[NSString stringWithFormat:@"%@: %@", message, [error localizedDescription]]];
- else
- [alert setInformativeText:message];
- [alert addButtonWithTitle:@"OK"];
- [alert runModal];
- [pool drain];
+ @autoreleasepool {
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert setMessageText:title];
+ if (error)
+ [alert setInformativeText:[NSString stringWithFormat:@"%@: %@", message, [error localizedDescription]]];
+ else
+ [alert setInformativeText:message];
+ [alert addButtonWithTitle:@"OK"];
+ [alert runModal];
+ }