Smart pointers instead of GC?

Brad Anderson eco at gnuk.net
Tue Feb 4 14:07:44 PST 2014


On Tuesday, 4 February 2014 at 20:53:50 UTC, Nordlöw wrote:
>>
>> std.typecons.RefCounted!T
>>
>
> Does this work equally well with T being both a value objects 
> (struct) and reference objects (class)?

RefCounted doesn't support classes yet but that's just because 
nobody has taken the time to implement it. There also needs to be 
a WeakRef added in order to round out the smart pointer support.

Once that's done Phobos will at least have parity with C++ (it 
already has Unique).


More information about the Digitalmars-d mailing list