rubrin
rubrin

Reputation: 99

how to release memory,object,viewcontroller when you pop to root ViewController

I am working with a navigation controller segue which contains around 5 ViewController. Each ViewController is preceded for another one like an installation app. The last ViewController contains a button which makes you go back to the first ViewController through this sentence:

[self.navigationController popToRootViewControllerAnimated:YES];

My questions is, how can I release all the objects, ViewController, memory which I have been storing during the first execution of the application, and when I click the button to go back to the first ViewController, get the environment as a first execution.

Any ideas? Thanks!

Upvotes: 0

Views: 853

Answers (1)

arun.s
arun.s

Reputation: 1528

This method pops all the view controllers on the stack except the root view controller.

Upvotes: 1

Related Questions