[Issue 2642] .init contains zeroes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 2 13:36:49 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2642
------- Comment #1 from 2korden at gmail.com 2009-02-02 15:36 -------
It works as designed. Design, however, can be given another thought.
I agree it is a bad idea of storing T.init as raw data within executable.
Instead, T.init could be made a property (function) that returns
default-initialized value. T init(ref T value); could be used to initialize
value in-place. Both would use dynamic initializer (memset etc) when
appropriate.
--
More information about the Digitalmars-d-bugs
mailing list