Idea #1 on integrating RC with GC

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Wed Feb 5 10:45:27 PST 2014


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.


More information about the Digitalmars-d mailing list