[Issue 21989] [REG 2.096] Double destruction of new'ed aggregates since `-preview=dtorfields` became the default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 6 15:09:57 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #4 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel created dlang/dmd pull request #12641 "Fix 21989 - Reset
destructed instance with preview=dtorfields" fixing this issue:

- Fix 21989 - Reset destructed instance with preview=dtorfields

  Emplacing the initializer ensures that the GC won't run the destructor
  on an invalid instance.

  Preventing the destructor call from the GC doesn't seem to be feasible
  due to the potentually lesser qualified GC interface (not `pure`, ...).

https://github.com/dlang/dmd/pull/12641

--


More information about the Digitalmars-d-bugs mailing list