Every 30 seconds, post an Other event to trigger clearing of the autorelease pool; otherwise, we'll amass unreleased objects when the system is idle. This replaces a cycling NSAutoreleasePool system which solved the same problem but which posed problems in some future timelines.
5 // Created by Evan Schoenberg on 5/10/07.
8 #import "GrowlApplication.h"
10 @implementation GrowlApplication
12 - (void)resetAutoreleasePool:(NSTimer *)timer
14 #pragma unused (timer)
15 [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined
18 timestamp: (double)(AbsoluteToDuration(UpTime())) / 1000.0
29 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
30 [[NSTimer scheduledTimerWithTimeInterval:30
32 selector:@selector(resetAutoreleasePool:)