[Issue 15836] [REG 2.071-b1] memory error when a class is not implicitly destructed and constructed with new
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Mar 31 00:12:06 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15836
Rainer Schuetze <r.sagitario at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |r.sagitario at gmx.de
--- Comment #2 from Rainer Schuetze <r.sagitario at gmx.de> ---
The trouble is that the destructor of MemoryStream is calling GC.addrOf in the
finalization stage of a collection, and there is a new check that explicitly
disallows this.
At the sweep stage, the GC is in an intermediate state that might not yield
sensible results for GC.addrOf and friends. I think using this as an indicator
whether a block of memory is allocated by the GC depends on its exact
implementation (block immediately "freed" after finalization?), and it might
restrict the inner workings of the GC too much if we make this a requirement.
--
More information about the Digitalmars-d-bugs
mailing list