Comment #1 by andrej.mitrovich — 2012-01-04T07:07:56Z
(In reply to comment #0)
To clarify: It should print 1 both times. I think the dtor should run on app exit, since it's a static variable.
Comment #2 by k.hara.pg — 2012-01-06T08:27:30Z
https://github.com/D-Programming-Language/dmd/pull/612
NOTE: This patch does not fix "dtor is never called on global variable" problem
(it is filed as bug 6437).
So after the patch applied, foo's dtor would never be called.
Comment #3 by andrej.mitrovich — 2012-01-06T09:24:52Z
(In reply to comment #2)
> https://github.com/D-Programming-Language/dmd/pull/612
>
> NOTE: This patch does not fix "dtor is never called on global variable" problem
> (it is filed as bug 6437).
> So after the patch applied, foo's dtor would never be called.
Yeah they're two different bugs, I guess. Thanks for fixing this one though!