I am down at one point in my application that I reset the user to top screen by using popToRootViewController - and then adjust the position pushing new views. I am asking myself what happens with all intermediary views in between... should I properly loop through them to release/dispose of them and how?
I have a low memory crash and I think it could come from this.
Thanks for any help in advance
Cheers, geebee
EDIT1: I understand now that this is done automatically - BUT: 1) are there cases it is not do开发者_如何学Gone... 2) what method should I call to really free them (I only want to keep the views up to 4 and anything after should be discarded). I trust you guys but all indicates from the lives bytes growing that something is staying behind... Thanks for your help
popToRootViewController
will release all intermediate viewcontroller memory. Check this
When a view controller is poped from the stack it's automatically release so you don't have to manually go and release it. Since popToRootViewController
pops every viewController from the stack until it reaches the top one you don't have to worry about releasing them manually.
精彩评论