Re: GC pros and cons
Re: GC pros and cons
- Subject: Re: GC pros and cons
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 28 Jun 2009 18:42:51 -0500
On Jun 28, 2009, at 6:32 PM, Quincey Morris wrote:
On Jun 28, 2009, at 16:12, Michael Ash wrote:
Your way sounds sensible, but according to the docs that's not how
it is.
We'll have to wait for b.bum to adjudicate, since the docs
contradict what he said earlier:
bbum is currently on vacation and only answering questions from memory
because bbum's hard drive done gone and exploded. I'm sans dev tools
or source! (Yes, I find answering questions on cocoa-dev and reading
source to be vacating. Go figure). Thankfully, I lost nothing save
for a few bad pictures. All the good ones were fine.
In any case, it entirely depends on the zone of allocation.
MOST of the time, a CF based object will be allocated from the GC zone
and, thus, the collector will treat it just like any other random CF*
or NS* based object.
The one key difference between CF* and NS* objects is that CF* objects
are created CFRetain'ed. That is, they won't be collected until they
are explicitly CFRelease'd.
CFMakeCollectible() simply CFRelease()s the object and leaves it up to
the collector get around to collecting it.
However, CF can have other kinds of allocators than the default one.
Thus, it is possible to create CF objects that don't follow these
rules. But don't do that.
And, as Michael said:
Doesn't take any experience, just a bit of reading. I'd recommend that
all participants in this thread read the Garbage Collection
Programming Guide top to bottom before continuing any further....
Absolutely right. Go do that.
b.bum
_______________________________________________
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