Destructor called while object is still alive

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Oct 23 19:36:38 UTC 2020


On Fri, Oct 23, 2020 at 07:23:03PM +0000, frame via Digitalmars-d wrote:
> On Friday, 23 October 2020 at 17:47:34 UTC, Steven Schveighoffer wrote:
[...]
> > The optimizer is wrong, and should be changed.
> > 
> > Note that LDC does not do this optimization.
[...]
> So how can I avoid this issue with DMD? Disabling any optimization? In
> fact it does not occur with debug mode enabled.
[...]

IMNSHO, drop dmd and use ldc2 instead.  Life is too short to have to
deal with dmd backend bugs when I'm trying to get things *done*.  This
isn't the first time the dmd backend has problems when optimization /
inlining are enabled, and I fear it won't be the last.


T

-- 
MS Windows: 64-bit rehash of 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand 1-bit of competition.


More information about the Digitalmars-d mailing list