[Issue 2834] Struct Destructors are not called by the GC, but called on explicit delete.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 4 15:40:59 PDT 2014


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

--- Comment #18 from Jonathan M Davis <jmdavisProg at gmx.com> ---
(In reply to Orvid King from comment #17)
> https://github.com/D-Programming-Language/druntime/pull/864
> 
> It's not feasibly possible to call destructors on heap-allocated arrays of
> structures, however this PR does implement the calling of destructors for
> structs allocated directly on the heap.

As I understand it, it should be possible to call the destructors for structs
in arrays if we have the additional type information required for precise heap
scanning, but until we add that, we're stuck. But if you can make it so that
the destructors get called in other circumstances, that's a great improvement
regardless.

--


More information about the Digitalmars-d-bugs mailing list