should i use release or autorelease for varSecondViewController?
-(IBAction)takeNextStep: (id) sender
{
SecondViewController *varSecondViewController = [[SecondViewController alloc]
initWithNibName:@"SecondViewController" bundle:nil];
[self.navigationController pushViewController:varSecondViewController animated:YES];
[varSecondViewController release];
}
My rule of thumb:
If you’re going to use it, and then no longer need a reference to it, release it,
If you’re going to pass it back to the caller (i.e. return it), autorelease it.