Reputation: 2665
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal view which contains asynchronous http calls the app eventually freezes up with a EXC_BAD_ACCESS message. I'm relatively confident that there aren't any memory leaks in either the modal view or the viewcontroller that's launching it (at least none that I can find via the leak detection tool in xcode). My n00b mind wonders what happens with pending asynchronous callbacks when all of a sudden the view has been dismissed. Is this something I should be concerned about, or does the iPhone OS handle this for me?
Upvotes: 2
Views: 347
Reputation: 33592
Additionally, have your view controller un-set itself as the delegate for pending HTTP requests in dealloc.
Upvotes: 1
Reputation: 40203
You should retain the view controller in your HTTP request class or if you don't have an abstraction class, retain and release itself in the delegate methods.
Upvotes: 2