Confusion regarding struct lifecycle
Matt Elkins via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Feb 15 19:39:00 PST 2016
On Tuesday, 16 February 2016 at 03:31:51 UTC, maik klein wrote:
> In D you can always call Foo.init even with @disable this(),
Foo.init can be called implicitly (not just explicitly)? If so,
why even have @disable this(), if it offers no guarantees?
> The first 3 destructor calls are from the 3 Foo.inits in your
> static array.
But why only 3? There are 5 Foos in the array, and 4 were
explicitly overwritten...
More information about the Digitalmars-d-learn
mailing list