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