Infos on atexit()

Is atexit a "Evil" function?
I know it cannot be used from a DLL for some reasons, and that's my main reason why i would like to have another function similar to it, maybe on_exit, but i know nothing about it.

For my actual needs, i could clearly use atexit (And it works pretty good), but i'd like to have some more infos about it. (I Already know about the limit of 32+ functions)
atexit is a legacy C function which you should not use in C++, just define a static variable whose destructor does whatever you want.
Nice idea, didn't think of that!
EDIT: Works perfectly!
Last edited on
Topic archived. No new replies allowed.