AVAudioPlayer preloaded sound leaks from memory
问题 I have an AVAudioPlayer instance that loads sound in memory with audioPlayer.prepareToPlay() , and then after a few start playing it. I have a problem that in approximately ten minutes after entering background, it leaks from memory and I is not being prepared. After that fed hours, I don't have an ability to run prepareToPlay() again. How to leave that preloaded sound in memory for a long term? I am preparing sound to play in applicationDidFinishLaunchingWithOptions method: let dispatchQueue