Idea #1 on integrating RC with GC

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


On 2/5/14, 10:55 AM, Dicebot 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.
>
> Ok, clear. It will work then as far as I can see.
>
> But I am surprised this is considered a #1 issue to address.

"#1" as in "the first idea that came to mind". Just sorting by date :o).

> I have
> never been worried by lack of control over generated garbage in Phobos -
> it was the other way around, worries about control of how it is allocated.
>
> So yes, this is likely to solve issue you have mentioned but does not
> seem to be of any interest to me.

Noted. That part needs to be addressed by allocators.


Andrei



More information about the Digitalmars-d mailing list