Reputation: 4381
I'm getting a number of leaks in my app that are caused by using NSURLConnections. The thing is that all the leaks are system objects, not actually the objects I am creating. Things like CFURLConnection, CFURLRequest, URLConnectionInstanceData and HTTPBodyData. But the actual NSURLConnection is not reported as a leak and neither is the NSMutableURLRequest. I'm unable to post all of the code so here's the important information:
I've tried a number of different approaches to refactor the code and stop the problem but I really don't know how to track down the cause of the bug since everything is pointing to system libraries. Has anyone encountered a similar problem or have any ideas how one would go about finding where the problem lies?
Upvotes: 1
Views: 259
Reputation: 4381
This problem was caused by a malformed URL. It appears that if you supply an invalid url it causes a leak in CFNetwork.
Upvotes: 1