Re: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?
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