Does static ctor/dtor of struct behave differently in 2.067-b2?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 27 19:26:17 PST 2015


On Fri, 27 Feb 2015 23:58:16 +0000, amber wrote:

> On Friday, 27 February 2015 at 23:50:51 UTC, amber wrote:
>> Hi All,
> [snip]
>> Thanks, amber
> 
> [edited subject]
> 
> Sorry I should add that I'm talking about static ctor/dtor of struct.
> 
> The bug I see with 2.067-b2 is this:
> 
> 1. static this() {} called and static fields of struct are initialised
> 2. app runs, static fields are initialised.
> 3. static ~this() {} called and static fields of struct are NOT
> initialised.
> 
> 
> In step 3 with 2.066.1 all the static fields of struct are still
> initialised, as expected, and my app shuts down cleanly.

is your struct GC-allocated? and can you provide dustmited code or 
something we can play with?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150228/48a95ea2/attachment.sig>


More information about the Digitalmars-d-learn mailing list