我有以下代码,它是标签栏应用程序中的模态视图,分析是否存在潜在的内存泄漏
-(IBAction)switchView:(id)sender{
Algorithm2ViewControlleriPad *Algorithm2ViewControllergo = [[Algorithm2ViewControlleriPad alloc]
initWithNibName:@"Algorithm2ViewControlleriPad"
bundle:nil];
[UIView beginAnimations:@"flipview" context:nil];
[UIView setAnimationDuration:2];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:self.view.superview cache:NO];
[self.view addSubview:Algorithm2ViewControllergo.view];
[UIView commitAnimations];
}
在此代码的末尾添加[Algorithm2ViewControllergo release];
会产生exc_bad_access类型错误。
有关如何解决这个问题的任何建议吗?