Re: Why ARC over garbage collection?
Re: Why ARC over garbage collection?
- Subject: Re: Why ARC over garbage collection?
- From: Rick Mann <email@hidden>
- Date: Mon, 15 Oct 2012 17:37:48 -0700
So, was Apple's Obj-C GC not very good? Certainly seems to work fine on my OS X apps.
In any case, thanks for the answers. It basically boils down to "ARC works better than GC on iOS," which is a good reason, although I'm not convinced it has to be true.
--
Rick
On Oct 15, 2012, at 17:24 , 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
--
Rick
_______________________________________________
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