[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
Sat Jul 5 03:32:54 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=2834
Rainer Schuetze <r.sagitario at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |r.sagitario at gmx.de
--- Comment #21 from Rainer Schuetze <r.sagitario at gmx.de> ---
(In reply to Orvid King from comment #19)
> We still wouldn't be able to call the destructors in structs for arrays even
> with precise heap scanning
[...]
> How would we detect that?
The array handling in lifetime.d should supply a type info with a destructor
that iterates over the elements and calls their destructor. You might have to
generate that typeinfo at runtime, though.
--
More information about the Digitalmars-d-bugs
mailing list