This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: PATCH: Disable dynamic allocation in atexit


> -----Original Message-----
> From: newlib-owner@sourceware.org 
> One thing to bear in mind is that C++ applications will 
> register an atexit function for every statically allocated 
> object with a destructor.
>  For example:
> 
>   struct S { ~S(); };
>   S s;
> 
> will result in an atexit call to clean up "s".

Why doesn't the compiler create calls to the destructors such that they
get called automatically by the _fini function?  What else is it there
for?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]