static constructors/destructors and atexit
Alexandre Oliva
oliva@dcc.unicamp.br
Mon Aug 10 01:40:00 GMT 1998
Steven Parkes <parkes@sierravista.com> writes:
> Since an atexit() call is made for each and every object with a
> destructor, that only allows 32 objects. We've hit this limit.
> Could the scheduling of these functions be done some other way?
No, because the Standard requires that functions registered with calls
to atexit() be executed before the destructors of global objects
constructed after the registration, and after the destructors of
global objects constructed before the registration. This was
discussed in the thread `p2736.C Is dtor order guaranteed?' in this
mailing list, please check the archives:
http://www.cygnus.com/ml/egcs/1998-Jul/0667.html
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc
mailing list