Skip to content

Commit

Permalink
Merge pull request #27 from gloubibou/master
Browse files Browse the repository at this point in the history
MMMetalTabStyle instance leaked
  • Loading branch information
MiMo42 committed Jan 27, 2015
2 parents f22786e + e60183a commit 6ede494
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion MMTabBarView/MMTabBarView/MMTabBarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ - (id)initWithFrame:(NSRect)frame {
if (self) {
// Initialization
[self _commonInit];

_style = [[MMMetalTabStyle alloc] init];

[self registerForDraggedTypes:[NSArray arrayWithObjects:AttachedTabBarButtonUTI, nil]];

// resize
Expand Down Expand Up @@ -2125,6 +2128,10 @@ - (id)initWithCoder:(NSCoder *)aDecoder
_automaticallyAnimates = [aDecoder decodeBoolForKey:@"MMautomaticallyAnimates"];
_alwaysShowActiveTab = [aDecoder decodeBoolForKey:@"MMalwaysShowActiveTab"];
}

if (_style == nil) {
_style = [[MMMetalTabStyle alloc] init];
}
}

return self;
Expand Down Expand Up @@ -2274,7 +2281,7 @@ - (void)_commonInit {
_buttonMaxWidth = 280;
_buttonOptimumWidth = 130;
_tearOffStyle = MMTabBarTearOffAlphaWindow;
_style = [[MMMetalTabStyle alloc] init];
_style = nil;
_isReorderingTabViewItems = NO;
_destinationIndexForDraggedItem = NSNotFound;
_needsUpdate = NO;
Expand Down

0 comments on commit 6ede494

Please sign in to comment.