DIP74: Reference Counted Class Objects

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 27 00:53:29 PST 2015


On Thursday, 26 February 2015 at 22:02:51 UTC, Andrei 
Alexandrescu wrote:
>> So is the end game of dip25 and dip74 to not have to wrap 
>> types you
>> intend to manage with RC like C++ but just design the 
>> classes/structs
>> themselves around being RCed from the start?
>
> That is correct. Well as shown there are ways to design classes 
> that work both with RC and GC. -- Andrei

If a class is meant to be refcounted at compile time, what's a 
difference from
alias MyClass = RefCounted!MyClassImpl;
// use MyClass instead
except for it introduces an additional check for null and a 
branch?


More information about the Digitalmars-d mailing list