Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed memory leak

Fix memory leak of selectedTile and highlightedTile instances caused by
their improper setter implementation (the setter should release the old
value before assigning and retaining the new value) Origin: ehren
  • Loading branch information...
commit 1ee83c2a4316417cac2f717c285832ccbb811f2f 1 parent 974e593
@ChrisRM ChrisRM authored
View
2  Libraries/KalGridView.m
@@ -112,6 +112,7 @@ - (void)setHighlightedTile:(KalTileView *)tile
{
if (highlightedTile != tile) {
highlightedTile.highlighted = NO;
+ [highlightedTile release];
highlightedTile = [tile retain];
tile.highlighted = YES;
[tile setNeedsDisplay];
@@ -122,6 +123,7 @@ - (void)setSelectedTile:(KalTileView *)tile
{
if (selectedTile != tile) {
selectedTile.selected = NO;
+ [selectedTile release];
selectedTile = [tile retain];
tile.selected = YES;
[delegate didSelectDate:tile.date];
View
BIN  agcalendar.xcodeproj/project.xcworkspace/xcuserdata/agchris.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.