Re: NSURLConnection retaining delegate?
Re: NSURLConnection retaining delegate?
- Subject: Re: NSURLConnection retaining delegate?
- From: Jerry Krinock <email@hidden>
- Date: Wed, 25 Nov 2009 14:25:19 -0800
On 2009 Nov 25, at 12:53, Alexander Spohr wrote:
> I meant NSURLConnection.
If it is indeed not documented whether or not NSURLConnection retains its delegate, I believe you can design for either case.
* When a NSURLConnection completes, you may release it or allow it to be autoreleased.
* If you wish to terminate a NSURLConnection before it completes, you should send it a -cancel first.
* Normally the delegate is receiving and storing headers, data and errors for you. You should retain the delegate as long as you are interested in the headers, data or errors being stored. Once you have extracted or wish to abandon this information, release the delegate or allow it to be autoreleased.
The idea is that you mind your own references, and NSURLConnection will mind its own references.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden