Leak:
Code:
self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:nil];
Leak:
Code:
self.audioPlayer2 = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL2 error:nil]
Questionable:
Code:
-(IBAction) stage_3 {
//View Switch
Stage_3 *screen = [[Stage_3 alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
[screen release];
//Audio-Make sure the audio is at the start of the stream.
self.audioPlayer.currentTime = 0;
[self.audioPlayer play];
}
So you are going to a new view controller, but playing the music here in the old view controller? Why? Either make each view controller worry about its own music - and this would mean stopping the music in the old view controller when you go to the new one - or make a single, common audio player.
This is a good example of what I was talking about before. You are leaving these audio players alive, even though the view isn't on the screen. So, get rid of them, like I said all the way back in post #4.