Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMQuiltView memory leak #12

Open
haitaoli opened this issue Feb 12, 2013 · 0 comments
Open

TMQuiltView memory leak #12

haitaoli opened this issue Feb 12, 2013 · 0 comments

Comments

@haitaoli
Copy link

dealloc code releases _reusableViewsDictionary first, but then cleanupColumns code path will re-create the dictionary and leak all objects in it. The fix is to move cleanupColumns to the beginning of dealloc.

  • (void)dealloc {
    [_indexPaths release], _indexPaths = nil;
    [_reusableViewsDictionary release], _reusableViewsDictionary = nil;
    [_rowsToInsert release], _rowsToInsert = nil;
    [_rowsToDelete release], _rowsToDelete = nil;

    [self cleanupColumns]; <== leaks _reusableViewsDictionary

    [self removeGestureRecognizer:self.tapGestureRecognizer];
    [_tapGestureRecognizer release], _tapGestureRecognizer = nil;

    [super dealloc];
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant