Idea #1 on integrating RC with GC

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Feb 5 11:37:29 PST 2014


On 2/5/14, 10:45 AM, "Ola Fosheim Grøstad" 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Wednesday, 5 February 2014 at 18:33:54 UTC, Andrei Alexandrescu wrote:
>> Phobos needs to be able to return allocated memory without creating
>> litter. With RCSlice!T the ownership is passed back to the user. The
>> user can continue tracking it by using reference counting built into
>> RCSlice, or make the object "immortal" by calling .toGC against it.
>
> Would it be possible to use RCSlice for all reference counting? I.e.
> that a reference counter for a struct would be a RCSlice of fixed length 1?
>
> If so then maybe it would be nice, but with a different name.

This is only focusing on slices.

Andrei


More information about the Digitalmars-d mailing list