RAII limitations in D?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Aug 21 20:29:42 PDT 2014


On Friday, 22 August 2014 at 03:00:01 UTC, Timothee Cour via 
Digitalmars-d-learn wrote:
> On Thu, Aug 21, 2014 at 7:26 PM, Dicebot via 
> Digitalmars-d-learn <
> digitalmars-d-learn at puremagic.com> wrote:
>
>> http://dlang.org/phobos/std_typecons.html#.RefCounted
>
>
> That doesn't work with classes though; is there any way to get 
> a ref
> counted class?
>
> (and btw RefCounted should definitely appear in
> http://dlang.org/cpptod.html#raii)

It can be made to work with classes and probably should be. 
There's no fundamental reason why it can't. It's probably just 
more complicated.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list