• 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: Fritz Anderson <email@hidden>
  • Date: Tue, 16 Oct 2012 09:19:45 -0500

No doubt you are right. However, from the subject line of this thread, I had interpreted the OP's question to be about why _Apple_ had abandoned garbage collection _in favor of ARC_. The GC schemes that Apple might have implemented had it abandoned Objective-C would seem to be off-topic in this thread.

— F

On 15 Oct 2012, at 7:24 PM, Jens Alfke <email@hidden> wrote:


On Oct 15, 2012, at 4:02 PM, Fritz Anderson <email@hidden> wrote:

Garbage collection requires a continuously-running thread.

No, it doesn’t. The collector only needs to run if objects are being allocated by the app threads. Otherwise it blocks.

None of this is acceptable on devices that have limited battery life, comparatively little RAM, no paging, and CPUs that are orders of magnitude slower than those in desktop machines.

Unless they’re Android or Windows Phone devices, both of which use garbage-collected runtimes (Java and C#/CLR, respectively.)

Also, the CPUs may be slower than current desktops/laptops, but they’re no slouches. The iPhone 5’s CPU is apparently as fast as the fastest PPC G5s Apple ever released. And garbage collection was being used effectively on older computers many orders of magnitude slower than that.

As I said before, it’s much harder (perhaps impossible) to implement really efficient GC for native apps. It works a lot better in ‘managed’ environments like Java/C#/Smalltalk/LISP/etc.

—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

  • Follow-Ups:
    • Re: Why ARC over garbage collection?
      • From: Rick Mann <email@hidden>
References: 
 >Why ARC over garbage collection? (From: Rick Mann <email@hidden>)
 >Re: Why ARC over garbage collection? (From: Fritz Anderson <email@hidden>)
 >Re: Why ARC over garbage collection? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Xcode does not play nice with AutoSave in Mountain Lion
  • Next by Date: Re: Xcode does not play nice with AutoSave in Mountain Lion
  • Previous by thread: Re: Why ARC over garbage collection?
  • Next by thread: Re: Why ARC over garbage collection?
  • Index(es):
    • Date
    • Thread