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.

Reply via email to