D's Destructors are What Scott Meyers Warned Us About
Mike Franklin
slavo5150 at yahoo.com
Thu May 24 01:38:50 UTC 2018
On Wednesday, 23 May 2018 at 13:12:57 UTC, Steven Schveighoffer
wrote:
> Hm.. that should be fixed. I don't see why we can't just do =
> T.init, we should at least be optimizing to this for small
> enough structs.
The problem I ran into with this is that if you use T.init
directly you end up making copies (postblit) and then needing to
destruct those copies since they are temporary. That's why I had
to lower it to simpler byte array primitive.
Mike
More information about the Digitalmars-d
mailing list