December 29, 2013 Re: When is a class's destructor called? | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Sunday, 29 December 2013 at 14:24:05 UTC, bearophile wrote:
> 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
Yep, and it's a struct, so no inheritance.
|
Copyright © 1999-2021 by the D Language Foundation