Re: How to implement an array of dicts
Re: How to implement an array of dicts
- Subject: Re: How to implement an array of dicts
- From: mmalc crawford <email@hidden>
- Date: Thu, 20 Dec 2007 17:29:40 -0800
On Dec 20, 2007, at 5:13 PM, Jack Hayward wrote:
The finalize method is supplied as part of the QC-plugin template.
Oh, it's set up as a mixed-mode project. *If* you need to support
both garbage collection and managed memory, then for the most part --
as far as Cocoa is concerned -- you simply write your code as if you
were just supporting managed memory (the retains, releases, etc. are
no-ops). You should implement a dealloc method just as you would
normally, and as suggested previously you should try to avoid writing
a finalize method. The one minor difference is that if you use an
autorelease pool, when you're finished with it you send it 'drain'
instead of 'release'.
If you're allocating your own memory, or using Core Foundation
objects, things are a little trickier -- for more on the latter see <http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcCoreFoundation.html
>.
mmalc
_______________________________________________
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