My app uses AUPlayerMBS objects to play sounds, possibly simultaneously (each with its AUPlayerMBS player).
But each time a new sound is played, I’m seeing the app’s RAM growing to almost 500 MB more, without ever being released. Needless to say that the app becomes quickly unusable.
I tried Player.Pause, Player.Reset and Player=nil in an attempt to release them, but these have no effect. It doesn’t seem that AUPlayerMBS has an explicit “unload” method, so currently, I’m just guessing we can’t release them.
Am I overlooking something, or they are indeed leaking memory?
I found a few smaller things like a string not being released.
Nothing big. Seems like the underlaying framework may have some kind of file cache since memory doesn’t increase if I load 10 times the same file.
But if I switch to different file, it increases.
Please subclass AUPlayerMBS, add a destructor with break point and make sure the player object is released.