exit(1)?

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 16 23:33:36 PST 2015


On 2015-12-17 06:11, Jakob Ovrum wrote:

> Ouch, that's not good. `exit` is not a good way to terminate a D
> program. It doesn't call destructors, including module destructors. The
> example should be restructured to `return 1;` from `main`.

I agree with that, but why don't the runtime register a function with 
"atexit" that cleans up everything?

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list