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.)
精彩评论