Code:
- (void) playIt:(NSString*)sndTxt andType:(NSString*)sndType {
NSString *path = [[NSBundle mainBundle] pathForResource:sndTxt ofType:sndType];
theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
theAudio.delegate = self;
[theAudio play];
}
Code:
[self playIt:@"button-30" andType:@"mp3"];
"Leaked Object:
GeneralBlock-304
AVAudioPlayer"
Anyone know how to free the leaks causes by the avPlayer?