Sack Library Documentation
|
#define PRIORITY_ATEXIT(name,priority) static void name(void); \ static class pastejunk(shutdown_,name) { \ public:pastejunk(shutdown_,name)() { \ RegisterPriorityShutdownProc( name,_WIDE(#name),priority,(void*)this,WIDE__FILE__,__LINE__ );\ /*name(); / * call on destructor of static object.*/ \ } \ } do_shutdown_##name; \ static void name(void)
Defines some code to run at program shutdown time. Allows specification of a priority. Higher priorities are run first.
PRIORITY_ATEXIT( MyOtherShutdown, 153 ) { // run some code probably before most library code dissolves. // last to load, first to unload. }
Copyright (c) 2000+. All rights reserved.
|
What do you think about this topic? Send feedback!
|