More radical ideas about gc and reference counting

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 30 13:45:58 PDT 2014


On 4/30/14, 1:31 PM, Vladimir Panteleev wrote:
> On Wednesday, 30 April 2014 at 20:21:33 UTC, Andrei Alexandrescu wrote:
>> Walter and I have had a long chat in which we figured our current
>> offering of abstractions could be improved. Here are some thoughts.
>> There's a lot of work ahead of us on that and I wanted to make sure
>> we're getting full community buy-in and backup.
>>
>> First off, we're considering eliminating destructor calls from within
>> the GC entirely. It makes for a faster and better GC, but the real
>> reason here is that destructors are philosophically bankrupt in a GC
>> environment. I think there's no need to argue that in this community.
>> The GC never guarantees calling destructors even today, so this
>> decision would be just a point in the definition space (albeit an
>> extreme one).
>
> An extreme one indeed, it would break a lot of my code. Every D project
> I wrote that does networking manages memory using a class that resides
> on the managed heap, but holds the actual wrapped data in the unmanaged
> heap.

So should I take it those classes all have destructors? -- Andrei


More information about the Digitalmars-d mailing list