ios - background methods are not stopping after viewWillDisappear/ Dealloc -


first of check understand doing

i did not answer in above question & still waiting it.

now new porblem when click on button using following code, methods of last viewcontroller still running. use memory & keep processing untill gets response(that`s want if user press want stop methods)

     [self.navigationcontroller popviewcontrolleranimated:yes];  

how stop it?

you need [gettryagaintask cancel] (assuming gettryagaintask of type nsurlsessiondownloadtask) before pop controller. download task asynchronous , runs irrespective of controller (that fired it) being deallocated. might cause retain loops, leading app crash. code of now, go infinite loop. better solution keep tab on number of retries (say 3 times) , prompt user problem, asking if he/she try again.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -