Remove use of autorelease NSString and NSURL

Since there is no autorelease pool, these were leaking.
This commit is contained in:
Justin Hawkwood 2015-03-30 16:27:05 -07:00
parent 6887a063ab
commit 237e809f23
1 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,9 @@ void AudioPlayer::rotateBufferThread(int offsetFrame)
ALint bufferProcessed = 0;
ExtAudioFileRef extRef = nullptr;
auto fileURL = (CFURLRef)[[NSURL fileURLWithPath:[NSString stringWithCString:_audioCache->_fileFullPath.c_str() encoding:[NSString defaultCStringEncoding]]] retain];
NSString *fileFullPath = [[NSString alloc] initWithCString:_audioCache->_fileFullPath.c_str() encoding:[NSString defaultCStringEncoding]];
auto fileURL = (CFURLRef)[[NSURL alloc] initFileURLWithPath:fileFullPath];
[fileFullPath release];
char* tmpBuffer = (char*)malloc(_audioCache->_queBufferBytes);
auto frames = _audioCache->_queBufferFrames;