Skip to content

Commit

Permalink
Fix memory management issue in KCDefaultVisualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
akitchen committed Nov 15, 2015
1 parent 7b6888a commit b83f78d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions keycastr/KCDefaultVisualizer.m
Expand Up @@ -180,6 +180,7 @@ -(id) initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backi

-(void) _lineBreak:(id)sender
{
[_mostRecentBezelView release];
_mostRecentBezelView = nil;
}

Expand Down Expand Up @@ -221,9 +222,7 @@ -(void) addKeystroke:(KCKeystroke*)keystroke

[self setFrame:frame display:YES animate:NO];

[[self contentView] addSubview:[_mostRecentBezelView autorelease]];
if ([keystroke isCommand])
_mostRecentBezelView = nil;
[[self contentView] addSubview:_mostRecentBezelView];
}
else
{
Expand All @@ -234,7 +233,6 @@ -(void) addKeystroke:(KCKeystroke*)keystroke

-(void) abandonCurrentView
{
_mostRecentBezelView = nil;
[self _cancelLineBreak];
}

Expand Down

0 comments on commit b83f78d

Please sign in to comment.