In the App Delegate, I am preloading all my sound effects and background music.
When testing with Instruments, the tool shows that I am leaking memory, the source being SimpleAudioEngine and a bunch of other classes related to playing sounds. Is preloadEffect and preloadBackgroundMusic really that bad? How can I fix my memory leaks? Thank you!
In the App Delegate, I am preloading all my sound effects and background music.
Share
Preloading effects is not bad practice, to the contrary. When the sound effect plays for the first time, it is loaded just like with the preload methods. The only thing preloading does is to avoid a stutter or freeze while the effect plays for the first time. For large audio files this can cause the app to pause for a tenth of a second or possibly more.