我收到一个分析器错误,显示以下代码中的潜在泄漏:
- (void)viewDidLoad {
[super viewDidLoad];
mAngle = 0.0;
cligneBool = YES;
SoundManager *mSoundManager = [[SoundManager alloc] init];
[mSoundManager initOpenAL];
[mSoundManager loadSound:[[NSBundle mainBundle] pathForResource:@"bing.wav" ofType:nil] SoundKey:@"bing"];
[mSoundManager loadSound:[[NSBundle mainBundle] pathForResource:@"ding.wav" ofType:nil] SoundKey:@"ding"];
[mSoundManager loadSound:[[NSBundle mainBundle] pathForResource:@"click.wav" ofType:nil] SoundKey:@"click"];
[mSoundManager loadSound:[[NSBundle mainBundle] pathForResource:@"die.wav" ofType:nil] SoundKey:@"die"];
[mSoundManager loadSound:[[NSBundle mainBundle] pathForResource:@"kaboom.wav" ofType:nil] SoundKey:@"kaboom"];
[mSoundManager loadMusic:@"Musique - Finale.mp3" MusicKey:@"intro"];
[mSoundManager loadMusic:@"game_music01.wav" MusicKey:@"game01"];
[mSoundManager playMusic:@"intro" Loops:YES];
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
NSString *volume = (NSString *)[userDefault objectForKey:@"volume"];
sunAnimate.center = CGPointMake(self.view.frame.size.width/2,self.view.frame.size.height/2);
if(volume == nil) {
[userDefault setValue:@"1.0" forKey:@"volume"];
} else {
float mVolume = [volume floatValue];
[mSoundManager setMusicVolume:mVolume];
}
[self sunTurn];
[NSTimer scheduledTimerWithTimeInterval:3.10 target:self selector:@selector(cligne) userInfo:nil repeats:YES];
}
任何人都可以看到上述代码集的问题吗?
这是我在应用程序代码中的最后一个错误,所以任何帮助清除这个错误将不胜感激!
谢谢!