> On Aug 25, 2014, at 9:40 AM, Howard Moon <how...@antarestech.com> wrote: > > Ok, I fixed it. I was using the connection object as a member of my class, > and releasing that, when I should have been releasing the connection that is > given to me inside didFailWithError and connectionDidFinishLoading, not > making it a member at all.
It should be OK either way as long as you're following the ref-counting rules (or are using ARC.) * Only release the NSURLConnection if you allocated it by calling +alloc * Don't release the NSURLConnection instance passed into your delegate methods Also, NSURLConnection instances always stay alive until the connection finishes (they are retained by CFNetwork internally) so you actually don't need to retain them yourself. —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com