Sephiroth87 / ODRefreshControl

A pull down to refresh control like the one in Apple's iOS6 Mail App
MIT License
2.15k stars 385 forks source link

TableView deallocated while key value observers still registered #16

Closed mdestagnol closed 12 years ago

mdestagnol commented 12 years ago

Hi,

I noticed a crash when you have a navigation stack of tableviewcontroller that use your lib.

To reproduce the bug, open multiple tableviewcontroller. Then simulate a memory warning and you'll see that something is wrong with your KeyValue observing.

The problem comes from this line :

[scrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:nil];

By the way thx a lot for your lib, great work! :)