最近、AudioToolbox フレームワークを使い始めたところ、 というメソッドがあることに気付きましたAudioServicesDisposeSystemSoundID()
。
知っておくと、AudioServicesCreateSystemSoundID()
init myを呼び出すときに上記のメソッドを呼び出さないのはメモリリークSystemSoundID
ですか? 私はそれを次のように呼んでいます:
AudioServicesCreateSystemSoundID((CFURLRef)filePath, &sound);
そのように filePath は NSURL であり、 soundSystemSoundID
です。