• 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: Does autoreleased NSURLConnection object guarantee job completion?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does autoreleased NSURLConnection object guarantee job completion?


  • Subject: Re: Does autoreleased NSURLConnection object guarantee job completion?
  • From: Conrad Shultz <email@hidden>
  • Date: Thu, 12 Aug 2010 12:41:13 -0700

On Aug 12, 2010, at 11:06, Keary Suska <email@hidden> wrote:

> If you really don't want (or can't have) an instance variable, you can init/alloc then release in connectionDidFinishLoading: and connection:didFailWithError:. I wouldn't recommend this though, as it is probably "bad form", but as long you never want to memory-manage NSURLConnections in that class, ever, it would be somewhat future proof.

(First humble post - I will introduce myself properly when I have time to send out my own lingering Cocoa question.)

Could you clarify why you think this paradigm is "bad form?" I only ask because as far as I can tell all of Apple's API docs follow said model. It seems like a good approach is to use init/alloc and still use an instance variable (to cancel the request, for example).

I also notice in the documentation that either of the init methods retain the delegate, whereas the class method is not documented as retaining the delegate. If my reading is correct, this will have design impact as well.

--
Conrad Shultz
www.synthetiqsolutions.com
_______________________________________________

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: Does autoreleased NSURLConnection object guarantee job completion?
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: [BYUCH] CocoaHeads meeting tonight!
  • Next by Date: iPhone app with searchable text that highlights
  • Previous by thread: Re: Using NSPredicateEditor with core data
  • Next by thread: Re: Does autoreleased NSURLConnection object guarantee job completion?
  • Index(es):
    • Date
    • Thread