On Thursday, 21 December 2017 at 18:45:27 UTC, Adam D. Ruppe
wrote:
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.
Is there some summary of the things you have to be aware of when
using the GC in D and not using the GC? I feel this would be very
useful especially for people that are new to D or are not used to
that kind of issues (because coming from a GCed language).