Releasing ViewControllers form memory inside a UINavigationController
问题 I'm building an app using a UINavigationController . I have a ViewController that shows some content, and when it receives interaction from the user (tapping a button for example) a new ViewController is displayed. Here is the code: FirstViewController.m -(IBAction)goToSecondVC:(id)sender{ SecondViewController *secondVC = [[SecondViewController alloc] init]; [self.navigationController pushViewController: secondVC]; } I want to release FirstViewController from memory once SecondViewController