import std.stdio; import std.c.stdlib;
void main()
{
S s;
exit(-1);
}
struct S
{
~this()
{
writeln("destructor");
}
}
This prints nothing, meaning that the destructor wasn't called.
But why do you want destructors to be called when you call
exit()? You are exiting in an "abnormal" way anyway.
