¡@

Home 

2014/10/15 ¤U¤È 10:04:38

iphone Programming Glossary: boing

MASSIVE AVAudioPlayer Memory Leaks

http://stackoverflow.com/questions/5932913/massive-avaudioplayer-memory-leaks

audio for my game. I have the following code in a method in a seperate class which is called every time I want the 'boing' sound to play. Problem is it leaks huge amounts of memory to the point where the game becomes unplayable. Now i'm not releasing.. of these methods. What is the best way to release the pointers in tis case Yes I have tried releasing straight after boing play this solves the leak obviously but the sound dosen't play so theres no point. void playBoing int x arc4random 3 1 NSString.. sound dosen't play so theres no point. void playBoing int x arc4random 3 1 NSString path NSString stringWithFormat @ boing_0 i.aif x NSString resourcePath NSBundle mainBundle resourcePath resourcePath resourcePath stringByAppendingString path..