mirror of https://github.com/axmolengine/axmol.git
Remove use of autorelease NSString and NSURL
Since there is no autorelease pool, these were leaking.
This commit is contained in:
parent
6887a063ab
commit
237e809f23
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue