Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
- Subject: Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
- From: Oftenwrong Soong <email@hidden>
- Date: Thu, 31 Dec 2009 10:36:09 -0800 (PST)
Hi all,
If it is true that the ONLY safe thing you can do in dealloc is release instance variables, then where else/how else are you supposed to implement a method that is guaranteed to be called upon an object's termination, so that you can do final cleanups, such as removing it as an observer or closing external resources such as files or network connections? Jerry isn't the only one who needs to do such cleanups, nor am I.
Thanks,
Soong
----- Original Message ----
From: Jerry Krinock <email@hidden>
To: Cocoa Developers <email@hidden>
Sent: Thu, December 31, 2009 9:36:47 AM
Subject: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
<snip>
Is this a good case study in why "the only safe thing to do in your dealloc method is to release instance variables", or have I misunderstood the problem?
<snip>
_______________________________________________
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