When is a class's destructor called?

bearophile bearophileHUGS at lycos.com
Sun Dec 29 06:24:03 PST 2013


Ali Çehreli:

> On 12/29/2013 04:00 AM, Mike:
>> Do you happen to know of any clever technique to make object, 
>> and
>> everything that inherits from it, a referenced counted object?
>
> There is std.typecons.RefCounted:
>
>   http://dlang.org/phobos/std_typecons.html#.RefCounted

I think it only works on a single object, not on the whole tree.

(And I think RefCounted is not used often in D.)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list