Properly Exiting a Program

closed account (S6k9GNh0)
I've never really given this much thought... but here we go:

If I were to exit a program, is it okay if I fail to properly destroy whatever structures were allocated?

For instance, if I do this with SDL, there might be obvious consequences like a dead window perhaps. But if I do this with a POD structure, is it okay?

Also, I realize RAII is supposed to fix parts of this but it's not perfect when environments are suddenly cut off with something like exit(1/0);
Last edited on
Graphics aside, what about open files, open network connections, ...
closed account (S6k9GNh0)
Yeah, I normally just let those die in a fire. Bad? I find the code required to fix that quite complicated and error prone.
Last edited on
Topic archived. No new replies allowed.