• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: GC pros and cons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: GC pros and cons (From: Graham Cox <email@hidden>)
 >Re: GC pros and cons (From: WT <email@hidden>)
 >Re: GC pros and cons (From: Graham Cox <email@hidden>)
 >Re: GC pros and cons (From: Bill Bumgarner <email@hidden>)
 >Re: GC pros and cons (From: James Gregurich <email@hidden>)
 >Re: GC pros and cons (From: Michael Ash <email@hidden>)
 >Re: GC pros and cons (From: Bill Bumgarner <email@hidden>)
 >Re: GC pros and cons (From: Michael Ash <email@hidden>)
 >Re: GC pros and cons (From: Quincey Morris <email@hidden>)
 >Re: GC pros and cons (From: Michael Ash <email@hidden>)
 >Re: GC pros and cons (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: GC pros and cons
  • Next by Date: Re: Positioning document within gray area of a scroller
  • Previous by thread: Re: GC pros and cons
  • Next by thread: Re: GC pros and cons
  • Index(es):
    • Date
    • Thread