Mail Archives: djgpp/1997/11/06/03:16:40
Eli Zaretskii wrote:
>
> On Mon, 3 Nov 1997, Nate Eldredge wrote:
>
[...]
> > move two lines of code. *Are* files Supposed to work in destructors?
>
> IMHO, people who use C++ extensively should answer this. There might
> be conflicts with objects that use I/O streams and are destructed by
> global destructors. DJ?
>
> Is it at all safe to assume that file handles beyond the 3 standard
> streams are available in the global destructor? After all, they *are*
> run after `main' returned, so at least in principle, this is a
> never-never land for the application, no?
Hmm. The destructor is usually called after the scope
of the variable end. So an object in main is deleted
after main, but _before_ (IMHO) the libc cleanup.
So I would think this is a bug.
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -