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
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 mails | Author | Date |
|---|---|---|
| Matt Mashyna | Feb 14, 19:48 | |
| Dave Camp | Feb 14, 20:32 | |
| Dave Camp | Feb 14, 20:41 | |
| Uli Kusterer | Feb 14, 20:54 |






Cocoa mail archive

