• 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: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?


  • Subject: Re: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?
  • From: Dave DeLong <email@hidden>
  • Date: Thu, 30 Sep 2010 09:18:15 -0600

I'd probably set the managed object as the delegate of your URL connection.  NSURLConnection retains its delegate, and NSURLConnection is itself retained by the run loop, so you don't have to worry about the managed object disappearing from underneath you.  Then you can simply clean up the connection in the connection:didFailWithError: or connectionDidFinish: delegate methods.

Dave

On Sep 30, 2010, at 7:41 AM, Jonathan del Strother wrote:

> if my model refaults while a connection is in progress,
> the connection ought to carry on uploading.  After the connection has
> uploading, it doesn't actually need the model's attributes, so won't
> trigger a new fetch.  So where am I supposed to release the
> connection?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?
      • From: Jonathan del Strother <email@hidden>
References: 
 >Exceptions to the "don't use -[NSManagedObject dealloc]" rule? (From: Jonathan del Strother <email@hidden>)

  • Prev by Date: NSOperation -dealloc not called
  • Next by Date: Re: NSOperation -dealloc not called
  • Previous by thread: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?
  • Next by thread: Re: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?
  • Index(es):
    • Date
    • Thread