site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1262284569; bh=Vcgo9Q3Xb42CXXp7/KrHuPNbtBk2Xl9yr41+6WfXom8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=ZZBOiU5UWVKcOFlYGbw9SbxMfX+yvq1ixYn0EHI+JvYce/Gyw0d4GvOS1oUIMXQtHX+Y/YeMRGhqYKiqiiZYC29queLVoQH+LJ+wAgcR7mC8POojSTiU1/1YA+aRRxJYMiqI8RKXYwrSinBxh4l+VvPuSp7cS7wI8KvP1/AJqRI= Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=QKGiHRQwBHS6R52JLnAn+UQORwNuJQQKymI/u1rzbtelCRue7GusXWvuRlGjyahBAaC2amQxtv1v3piSz6FIiomv6XvrFgxZDfAsNX4N0wJvYdTNjsB4PtAZG9pXIfJgjlBBCzIpwqgaj1g/H35tYUMmBsYd+R4Npwpp+DPC5SQ=; 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 <jerry@ieee.org> To: Cocoa Developers <cocoa-dev@lists.apple.com> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com