I know that I have to release object if I init a object. But I am not sure if some other cases. For example, do I have to release controllers? Is there a simple rule to decide when have to release or not?
Code:
NSMutableArray *controllers = [arrayWithArray:controller.viewControllers];
// modify controllers here
controller.viewControllers = controllers