in a UINavigationController, when es dealloc called? In my app, i have 4 ViewController:
View1Controller->View2Controller->View3Controller->View4Controller
If im in View2Controller and push Back Button to go to View1Controller, dealloc in View2Controller is called. But if im in View1Controller and go to View2Controller, dealloc never called in View1Controller.
It´s is OK? Or Its a leak?
Thanks.
EDIT
Pushing and popping view controllers on a UINavigationViewController stack acts like a stack in the general sense. If you had a stack that contains numbers, pushing 2, then 36 would give you a stack of 2 numbers, you wouldn't expect the 2 to disappear. Pushing a view controller is exactly the same, when you push ViewController2, you wouldn't expect ViewController1 to disappear.
However, with popping it's different. If you pop off the 36 you wouldn't expect the 36 to still exist. Same with view controllers. Pop off ViewController2 and it will get dealloced when the user interface displays ViewController1 views.