3

My app crashes when I try to play a sound (repeated). I can play the app for about 3 minutes before it crashes and when I remove the audio Nodes, the app does not crash and the memory usage stays relatively constant. I attach the audio node to an object that spawns and is then removed by calling the object.removeFromParent() function. I would think the audio node(which is a child of my object added by object.addChild(audiNode) would also be removed and not stick around in the memory. However, I think Xcode does not close the audioFile it opens. How can I close this file or make sure it is closed?

The app is made using spriteKit in IOS 10 for iPhone 7

0 Answers0