Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix memory leaks.

  • Loading branch information...
commit 0a47fe12ea3cb64cd272270b0781214cdebc3529 1 parent 5d321c7
@danielctull authored
Showing with 12 additions and 10 deletions.
  1. +12 −10 DTGridView/DTGridView.m
View
22 DTGridView/DTGridView.m
@@ -47,6 +47,18 @@ @implementation DTGridView
@synthesize dataSource, gridCells, numberOfRows, cellOffset, outset;
@synthesize decelerationTimer, draggingTimer;
+- (void)dealloc {
+ super.delegate = nil;
+ self.dataSource = nil;
+ [cellsOnScreen release], cellsOnScreen = nil;
+ [gridRows release], gridRows = nil;
+ [rowPositions release], rowPositions = nil;
+ [rowHeights release], rowHeights = nil;
+ [freeCells release], freeCells = nil;
+ [cellInfoForCellsOnScreen release], cellInfoForCellsOnScreen = nil;
+ [super dealloc];
+}
+
- (void)setGridDelegate:(id <DTGridViewDelegate>)aDelegate {
self.delegate = aDelegate;
}
@@ -174,16 +186,6 @@ - (void)draggingTimer:(NSTimer *)timer {
[self didEndMoving];
}
-- (void)dealloc {
- super.delegate = nil;
- self.dataSource = nil;
- [cellsOnScreen release];
- [gridRows release];
- [rowPositions release];
- [rowHeights release];
- [super dealloc];
-}
-
#pragma mark Adding and Removing Cells
- (void)addCellWithInfo:(NSObject<DTGridViewCellInfoProtocol> *)info {
Please sign in to comment.
Something went wrong with that request. Please try again.