Will exit() or an exception prevent an end-of-scope destructor from being called?
C++98 §18.3/8 discusses this.
exit is called static objects are destroyed,
atexit handlers are executed, open C streams are flushed and closed, and files created by
tmpfile are removed. Local automatic objects are not destroyed. I.e., no stack unwinding.
abort lets even less happen: no cleanup whatsoever.