[Issue 8293] Small amount of static analysis to avoid certain destructor bugs

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 2 11:51:39 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=8293

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
(In reply to Marco Leise from comment #2)
> Which more or less means that if such an object is allocated with new, there
> must always be a pointer to it to prevent automatic collection. Because it
> has to be manually destroyed to be safe.
> Or can the GC be improved in this regard?

Just use C malloc. This is what RefCounted!T does.

--


More information about the Digitalmars-d-bugs mailing list