我是iPhone SDK的新手,導航控制器上出現泄漏。 這裏是我的代碼:導航控制器上的內存管理
- (空)SignupClicked:(ID)發送 {
if(appdelegate.isiPad){
SignUpViewController *obj_SignUpViewController =[[SignUpViewController alloc] initWithNibName:@"SignUpViewControllerIpad" bundle:nil];
[self.navigationController pushViewController:obj_SignUpViewController animated:YES];
[obj_SignUpViewController release];
}
else {
SignUpViewController *obj_SignUpViewController =[[SignUpViewController alloc] initWithNibName:@"SignUpViewController" bundle:nil];
[self.navigationController pushViewController:obj_SignUpViewController animated:YES];
[obj_SignUpViewController release];
}
}
我在這些線路上越來越泄漏:
[self.navigationController pushViewController:obj_SignUpViewController animated:YES];
[self.navigationController pushViewController:obj_SignUpViewController animated:YES];
請幫我... 謝謝...
此代碼是很好..嘗試清除和分析再次 –