Fix continual allocation of auto-releaseable NSDate objects
The startInterval method of the AudioPlayer module causes a continually increasing number of NSDate objects to be allocated. The auto-release pool which wraps this code doesn't drain frequently enough causing an application's memory footprint to grow by roughly a megabyte every 5 minutes.
This commit is contained in:
parent
cf36e20e3e
commit
4e019bfcf2
|
|
@ -1632,7 +1632,8 @@ static void AudioQueueIsRunningCallbackProc(void* userData, AudioQueueRef audioQ
|
|||
break;
|
||||
}
|
||||
|
||||
[playbackThreadRunLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:10]];
|
||||
NSDate *date = [[NSDate alloc] initWithTimeIntervalSinceNow:10];
|
||||
[playbackThreadRunLoop runMode:NSDefaultRunLoopMode beforeDate:date];
|
||||
}
|
||||
|
||||
disposeWasRequested = NO;
|
||||
|
|
|
|||
Loading…
Reference in New Issue