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: Jonathan del Strother <email@hidden>
- Date: Thu, 30 Sep 2010 21:32:28 +0100
Do retained NSManagedObjects never fault, then?
On 30 September 2010 16:18, Dave DeLong <email@hidden> wrote:
> 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?
>
_______________________________________________
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