Don't expect class destructors to be called at all by the GC
Adam D. Ruppe
destructionator at gmail.com
Thu Dec 21 18:45:27 UTC 2017
On Thursday, 21 December 2017 at 18:20:19 UTC, H. S. Teoh wrote:
> When the scoped destruction of structs isn't an option,
> RefCounted!T seems to be a less evil alternative than an
> unreliable class dtor. :-/
Alas, RefCounted doesn't work well with inheritance...
Though, what you could do is make the refcounted owners and
borrow the actual reference later.
More information about the Digitalmars-d-learn
mailing list