[Issue 19214] New: Support object.destruct() for efficient (and correct!) destruction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 3 21:17:48 UTC 2018


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

          Issue ID: 19214
           Summary: Support object.destruct() for efficient (and correct!)
                    destruction
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: turkeyman at gmail.com

Please consider adding an object.destruct() function beside object.destroy() to
perform efficient destruction.

Not all instances of destruction should pay the code of re-initialisation.

Language complexity surrounding destruction makes direct calls to
__dtor/__xdtor too complex for the user to understand and implement correctly,
as evidenced by a myriad of OSS libs that have attempted, and failed.

--


More information about the Digitalmars-d-bugs mailing list