stdlib.exit()
Minas
minas_mina1990 at hotmail.co.uk
Mon Aug 20 07:04:41 PDT 2012
I don't know about the runtime, but destructors are not called
(not sure about module destructors)
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.
More information about the Digitalmars-d-learn
mailing list