I init a navigation controller with:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:firstViewController];
I wonder if the navigation controller retains firstViewController or that I need to keep it alive. When I release firstViewController, the navigation controller still works. That seems wrong.
Clarifications?
If it needs to keep it around it will
retainit. So yeah, you’ll be safe to release it if you don’t need it anymore. It’s not justinitWhatevermethods that have this behaviour – it’s the standard operation of the whole memory management model.