From 4e019bfcf2e157902b53509e3f17ffd58faa1c04 Mon Sep 17 00:00:00 2001 From: Piers Date: Wed, 17 Apr 2013 09:37:57 +0000 Subject: [PATCH 1/2] 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. --- Audjustable/Classes/AudioPlayer/AudioPlayer.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Audjustable/Classes/AudioPlayer/AudioPlayer.m b/Audjustable/Classes/AudioPlayer/AudioPlayer.m index 8ec9af3..94a47c2 100644 --- a/Audjustable/Classes/AudioPlayer/AudioPlayer.m +++ b/Audjustable/Classes/AudioPlayer/AudioPlayer.m @@ -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; From 91640f62078f94b2508b86a90ad3fef519f145cc Mon Sep 17 00:00:00 2001 From: Piers Date: Wed, 17 Apr 2013 10:12:07 +0000 Subject: [PATCH 2/2] Update podspec version --- Audjustable.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Audjustable.podspec b/Audjustable.podspec index 26d228b..1d5c079 100644 --- a/Audjustable.podspec +++ b/Audjustable.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Audjustable" - s.version = "0.0.3" + s.version = "0.0.4" s.summary = "A fast and extensible audio streamer for iOS and OSX with support for gapless playback and custom (non-HTTP) sources." s.homepage = "http://tumtumtum.github.com/audjustable/" s.license = 'MIT'