Idea #1 on integrating RC with GC

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Feb 5 10:33:53 PST 2014


On 2/5/14, 9:51 AM, Dicebot wrote:
> On Wednesday, 5 February 2014 at 17:40:35 UTC, Manu wrote:
>> Dunno, but I don't think any solution which uses RC!T will ever be
>> acceptable. It basically defeats the whole purpose.
>
> I feel terribly confused now :(
>
> Andrei, can you describe your intention with some big picture context?

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.

It's simple, really. All about libraries returning (and sometimes 
accepting) slices.


Andrei



More information about the Digitalmars-d mailing list