Retain cycle between MMTabBarView and MMTabBarController
nivekkagicom opened this issue · comments
nivekkagicom commented
I am seeing a retain cycle between MMTabBarView and MMTabBarController. It is my understanding that instance variables are strong by default under ARC so _tabBarView is a strong reference back to the MMTabBarView that allocated it and holds a strong pointer to its controller in _controller.
@implementation MMTabBarController
{
MMTabBarView *_tabBarView;
NSMenu *_overflowMenu;
}
@implementation MMTabBarView
{
// control basics
NSTabView *_tabView; // the tab view being navigated
MMOverflowPopUpButton *_overflowPopUpButton; // for too many tabs
MMRolloverButton *_addTabButton;
MMTabBarController *_controller;
Should not __weak be used to make the reference back to the view weak? That is
@implementation MMTabBarController
{
__weak MMTabBarView *_tabBarView;
NSMenu *_overflowMenu;
}
Michael Monscheuer commented
Thanks for nailing it. See Bugfix Release 1.2.1