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

Fixes a bug when view gets deallocated & showsPullToRefresh == NO #134

Closed
wants to merge 1 commit into from
Closed

Conversation

cuva
Copy link

@cuva cuva commented Jun 18, 2013

Observers were not correctly removed if showsPullToRefresh equals to NO.

This error what appearing :

"An instance 0x78b6e00 of class UITableView was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger."

This fixes the issue.

Cheers

@nonamelive
Copy link
Contributor

I had the same problem and I eventually removed the contentSize observer when showsPullToRefresh is set to NO. See #133 . It's very similar to your fix but at a different time. Not sure which one is better and if there're any side effects.

@cuva
Copy link
Author

cuva commented Jun 18, 2013

Indeed. I haven't had enough time to jump to the code, but as far as I can see this observer is not need when showsPullToRefresh is set to NO. I thought I had tried your fix before mine without success. But it works fine, and seems more logic this way.

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

Successfully merging this pull request may close these issues.

None yet

2 participants