ios - How to avoid crashes on call back to deallocated delegate objects -


my application on arc , still see few crashes. saw setting view controller delegate of alert view , when alert on screen, on tap on "ok" button moving previous view , current view controller getting dealloc-ed. after getting dealloc-ed, got call uikit alert view , crashes. safe handling, created property uialertview , in dealloc now, setting delegate of uialertview nil. working fine now.

i see crash happening randomly:

-[cfstring release]: message sent deallocated instance 0xd2de900 

my question here there lot many places create local instances of objects (custom view controllers or ios objects uialertview) , set view controller delegate of it. need create class level properties of them , delegate on them nil in dealloc? there other easy alternative make sure no call happens after delegate object gone.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -