How to convert code to properly release memory
- by BankStrong
I've taken over a code base that has subtle flaws - audio player goes mute, unlogged crashes, odd behavior, etc.
I found a way to provoke one instance of the problem and tracked it to this code snippet:
NSURL *soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:[[soundsToPlay objectAtIndex:count] description]
…