Skip navigation.
 
mlRe: Obj-C server and signal handling
FROM : Dave Camp
DATE : Thu Feb 14 20:41:04 2008

On Feb 14, 2008, at 11:32 AM, Dave Camp wrote:

> On Feb 14, 2008, at 10:48 AM, Matt Mashyna wrote:
>

>>     NSRunLoop *loopy = [NSRunLoop currentRunLoop];
>>     while (keepRunning && [loopy runMode:NSDefaultRunLoopMode
>>         beforeDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]);
>>

>
>
> Creating an NSDate in that tight loop will leak memory on each 
> iteration.


Clarification: it's not really leaked as it goes into the main 
autorelease pool, but that pool isn't drained until you exit..

Dave

Related mailsAuthorDate
mlObj-C server and signal handling Matt Mashyna Feb 14, 19:48
mlRe: Obj-C server and signal handling Dave Camp Feb 14, 20:32
mlRe: Obj-C server and signal handling Dave Camp Feb 14, 20:41
mlRe: Obj-C server and signal handling Uli Kusterer Feb 14, 20:54