mirror of https://github.com/axmolengine/axmol.git
Merge pull request #11223 from hawkwood/patch-6
Remove use of autorelease NSString and NSURL
This commit is contained in:
commit
6ef27df2fc
|
@ -99,7 +99,9 @@ void AudioCache::readDataTask()
|
|||
AudioBufferList theDataBuffer;
|
||||
ExtAudioFileRef extRef = nullptr;
|
||||
|
||||
auto fileURL = (CFURLRef)[[NSURL fileURLWithPath:[NSString stringWithCString:_fileFullPath.c_str() encoding:[NSString defaultCStringEncoding]]] retain];
|
||||
NSString *fileFullPath = [[NSString alloc] initWithCString:_fileFullPath.c_str() encoding:[NSString defaultCStringEncoding]];
|
||||
auto fileURL = (CFURLRef)[[NSURL alloc] initFileURLWithPath:fileFullPath];
|
||||
[fileFullPath release];
|
||||
|
||||
auto error = ExtAudioFileOpenURL(fileURL, &extRef);
|
||||
if(error) {
|
||||
|
|
Loading…
Reference in New Issue