开发者

Is AudioServicesDisposeSystemSoundID required?

I recently started working with the AudioToolbox framework and noticed that there is a method called AudioServicesDisposeSystemSoundID().

Just to know, is it a memory leak not to call the above method when calling AudioServicesCreateSystemSoundID() to init my SystemSoundID? I am calli开发者_如何学Cng it like:

AudioServicesCreateSystemSoundID((CFURLRef)filePath, &sound);

That way filePath being a NSURL and sound SystemSoundID.


Yes. Call it when you're done with sound. Otherwise, you may leak any memory associated with sound (which can be significant for A/V files.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜