When is a class's destructor called?

Ali Çehreli acehreli at yahoo.com
Sun Dec 29 05:37:37 PST 2013


On 12/29/2013 04:00 AM, Mike wrote:
> On Sunday, 29 December 2013 at 10:16:33 UTC, ponce wrote:
>> If you want deterministic destruction, you have plenty of choices:
>> - scoped!
>> - using structs instead
>> - scope(exit)
>> - RefCounted!
>> - Unique!
>> - ...
>
> 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

Ali



More information about the Digitalmars-d-learn mailing list