Skip to content

Commit

Permalink
Fixed memory leak. GMGridView never gets dealloced because of retain …
Browse files Browse the repository at this point in the history
…cycle with GMGridViewCell.
  • Loading branch information
soleares committed Jan 27, 2012
1 parent 611266b commit 3986f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GMGridView/API/GMGridView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ - (GMGridViewCell *)newItemSubViewForPosition:(NSInteger)position
NSInteger index = [weakSelf positionForItemSubview:aCell];
if (index != GMGV_INVALID_POSITION)
{
[weakSelf.dataSource GMGridView:self deleteItemAtIndex:index];
[weakSelf.dataSource GMGridView:weakSelf deleteItemAtIndex:index];
[weakSelf removeObjectAtIndex:index];
}
};
Expand Down

1 comment on commit 3986f54

@nameislihong
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好!请问我将一个view赋给cell.contentView (cell.contentView = aView),我的View上有个button,但是当我点击button时,并没有响应?

Please sign in to comment.