iOS xcode, Web services, NSURLConnection second call fails -
ipad development, ios 4.3, objective-c, xcode 4.1.
i have created wrapper class, used call method on web service. works fine when make first call, fails on subsequent calls.
a method in class, "runmethod::", opens nsurlconnection , call asynchronously, wrapper class nsurlconnection delegate.
i have read somewhere there's fault android, keeps pool of connections. when try make connection second time fails because previous connection has been kept open, despite code closing it. hence, suspect problem connection remains in pool, , when try make 1 clashes? maybe xcode has similar issue?
and symptoms of failure seemingly random 'bad access' on random line in 1 of delegate selectors, suggests has threading - understand http connections operate on own thread.
i can provide full wrapper class if need be, ideas?
a 'bad access' error indicates you're dereferencing invalid pointer. due improper memory management, such failing retain object. code help, first try analyze command in xcode -- static analyzer pretty @ finding memory problems.
Comments
Post a Comment