• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLConnection retaining delegate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSURLConnection retaining delegate?
      • From: Alexander Spohr <email@hidden>
References: 
 >Re: NSConnection retaining delegate? (From: Andy Lee <email@hidden>)
 >Re: NSURLConnection retaining delegate? (From: Alexander Spohr <email@hidden>)

  • Prev by Date: table view header cell bottom border
  • Next by Date: Re: EXC_BAD_ACCESS when calling NSOpenPanel
  • Previous by thread: Re: NSURLConnection retaining delegate?
  • Next by thread: Re: NSURLConnection retaining delegate?
  • Index(es):
    • Date
    • Thread