• 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: Michael Ash <email@hidden>
  • Date: Fri, 13 Aug 2010 13:38:59 -0400

On Thu, Aug 12, 2010 at 10:51 PM, yanghb <email@hidden> wrote:
> if the instance is released in delegate, what to perform the following
> code?OK, maybe code segment will always be there, but if the code
> access some instance vairable, it just will cause EXEC_ACCESS_BAD,
> isn't it?

This is absolutely correct. If you're going to release an object from
inside a delegate callback made by that object (which is *usually*
something you should avoid anyway), then use autorelease, rather than
release, to ensure that the object has a chance to finish its own code
before being destroyed.

Mike
_______________________________________________

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

References: 
 >Re: Does autoreleased NSURLConnection object guarantee job completion? (From: Conrad Shultz <email@hidden>)
 >Re: Does autoreleased NSURLConnection object guarantee job completion? (From: Keary Suska <email@hidden>)
 >Re: Does autoreleased NSURLConnection object guarantee job completion? (From: yanghb <email@hidden>)

  • Prev by Date: controlling keyboard cursor on NSTextFieldCell
  • Next by Date: Re: How to assure NSTask termination when parent dies
  • Previous by thread: Re: Does autoreleased NSURLConnection object guarantee job completion?
  • Next by thread: iPhone app with searchable text that highlights
  • Index(es):
    • Date
    • Thread