Re: Why ARC over garbage collection?
Re: Why ARC over garbage collection?
- Subject: Re: Why ARC over garbage collection?
- From: Lee Ann Rucker <email@hidden>
- Date: Tue, 16 Oct 2012 17:41:23 -0700
On Oct 16, 2012, at 5:03 PM, Rick Mann wrote:
>
> On Oct 16, 2012, at 16:57 , Scott Ribe <email@hidden> wrote:
>
>> On Oct 16, 2012, at 5:34 PM, Rick Mann wrote:
>>
>>>
>>> On Oct 16, 2012, at 16:25 , Jean-Daniel Dupas <email@hidden> wrote:
>>>
>>>> The point is that it can't be done without changing the language, dropping compatibility with all C/C++ libraries, and rewriting most existing software.
>>>
>>> I'm not sure that's been proven in this discussion.
>>
>> Well, perhaps not "proven" exactly. But what *has* been proven is that in C/C++ (and Objective-C by the same mechanism) is that one must use a conservative garbage collector--so the best-performing garbage collectors are simply not usable here.
>
> Is that really the case, given the code analysis that can be done nowadays? It seems like a combination of GC and -non-GC code can be made to work. I haven't thought very hard about it, but I don't see why even C/C++ code can't be made to work in a GC environment, even older code that calls malloc/new/free/delete.
>
> But, I'm willing to let this discussion drop. I was just curious.
Smalltalk did let you call C functions; we used it at ParcPlace to call the old Mac Classic APIs to use host widgets long before Java or the AWT existed. But making sure they went away when all the Smalltalk objects stopped referencing them was not fun; I spent a lot of time with allReferencesWeakly: making sure they went away. It did help that we had weak references back then too.
So yes it can work, but it's not something the framework can do for you without a lot of effort on the framework designer's end.
_______________________________________________
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