• 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: Why ARC over garbage collection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why ARC over garbage collection?


  • Subject: Re: Why ARC over garbage collection?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 15 Oct 2012 16:00:17 -0700


On Oct 15, 2012, at 3:38 PM, Rick Mann <email@hidden> wrote:

So, why is it that Apple considers ARC a better solution that garbage collection? Is it a performance thing?

Less memory overhead, I think, which is especially important in iOS devices. Ref-counting isn’t an especially good GC technique in general, but it’s highly incremental, meaning it collects garbage pretty continuously as it goes along instead of stopping periodically. Autorelease pools make it less incremental, but it’s still pretty constrained. Other GC techniques tend to leave garbage around longer, which increases overall memory use, which I think is why Apple never made GC available on iOS.

(I’m oversimplifying here. There are advanced GC algorithms that are more incremental/pauseless than the fairly simple and conservative one Apple uses on OS X, but they’re really hard to integrate into native code which can be doing all sorts of crazy stuff. It’s much easier in an interpreted/JITted language to track and constrain pointers.)

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Why ARC over garbage collection? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Why ARC over garbage collection?
  • Next by Date: Re: Why ARC over garbage collection?
  • Previous by thread: Re: Why ARC over garbage collection?
  • Next by thread: Re: Why ARC over garbage collection?
  • Index(es):
    • Date
    • Thread