Re: Guidelines for Cocoa frameworks supporting garbage collection?
Re: Guidelines for Cocoa frameworks supporting garbage collection?
- Subject: Re: Guidelines for Cocoa frameworks supporting garbage collection?
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 06 Jul 2008 13:58:59 -0400
- Thread-topic: Guidelines for Cocoa frameworks supporting garbage collection?
on 2008-07-06 1:40 PM, Quincey Morris at email@hidden wrote:
> The purpose of keeping stuff out of finalize is first and foremost
> about safety, and only secondarily about timing or collection-time
> overhead. Collectable memory that is referred to by an object being
> finalized may itself already have been finalized, causing the finalize
> to crash.
OK.
I just noticed (in an Apple tutorial on Objective-C 2.0) that
NSNotificationCenter observers don't need to be set to nil in GC, so that
eliminates one reason to need a -finalize method even apart from all this.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
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