Hi, I have the following code, that leaks in instruments when running in simulator ( memomry allocation is stable though) and is fine on the device. The code gets called everytime a button gets pressed.
Im a newbie - so any help and comments welcome :-)
if ( audioPlayer){
if ( [audioPlayer isPlaying] ) {
[audioPlayer stop];
audioPlayer.delegate=nil;
}
[audioPlayer release];
audioPlayer = nil;
}
audioPlayer = [[AVAudioPlayer alloc] initWithData:data error:&error];
audioPlayer.numberOfLoops = 0;
audioPlayer.delegate = self;
[audioPlayer play];