- I am using ARC.
- The case of study here inculdes a custom UITabBarController and one of its UIViewControllers.
- The Tabbar have a strong reference to an Object of some class. That object also have a strong reference to the Tabbar itself which caused a loop that caused the dealloc not to be called.
- Same thing with the ViewController it has a strong reference to an Object and the object back to the viewcontroller. Its not getting deallocated too. but that happen because its parent uitabbarcontroller is not deallocated. When I remove strong reference from the tabbar to the object both gets deallocated while logically only the tabbar should be allocated since the viewcontroller still have the strong loop reference.
Any idea what is happenning here. I investigated this for like 2 hours with no results.
Why the viewcontroller and the uitabbarcontroller is not behaving the same way?