RAD Studio |  |

atexit, #pragma exit, And Destructors
See Also
Collapse All

All global objects are active until the code in all exit procedures has executed. Local variables, including those declared in the main function, are destroyed as they go out of scope. The order of execution at the end of a program is as follows:

- atexit() functions are executed in the order they were inserted.
- #pragma exit functions are executed in the order of their priority codes.
- Destructors for global variables are called.

See Also

Class Initialization

Invoking Destructors

Exit And Destructors

abort And Destructors

Virtual Destructors

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!