Will gcc's deconstructor still run if the program crashes (due to a segfault or whatever else), or only on a successful exit or end of main?
Printable View
Will gcc's deconstructor still run if the program crashes (due to a segfault or whatever else), or only on a successful exit or end of main?
All bets are off as soon as your program does anything not covered by the standard - such as accessing non existent memory causing segfaults.
Plus the manual page only mentions normal exits.
Quote:
Originally Posted by gcc manual