Have you ever come across a problem where dealloc of ViewController was not getting called?
Yes, there can be a case where it can happen.
I was adding a View as subview to another View like as follows
_secondViewController is an object of SecondViewController
SecondViewController has a Valid NSTimer object.
then i remove _secondViewController from current View like as follows,
but after this step the dealloc method for SecondViewController has not been called.
adding [_secondViewController.timer invalidate]; before releasing the _secondViewController, The dealloc was called.
So if you are wondering why dealloc method is not getting called just check, if timer is present there, If so then invalidate it and try again.