edwardUL99 / StudSysCppCLI

A CLI UI for the StudSysCpp Project. This is a "dummy" project that is not used but done to practise C++ and also software engineering in terms of issues, issue tracking, issue refinement, requirements engineering, releases and also databases
GNU General Public License v3.0
0 stars 0 forks source link

Calling exit() may not call destructors #82

Closed edwardUL99 closed 4 years ago

edwardUL99 commented 4 years ago

Calling exit(0) in ui::quit may not call destructors. See https://stackoverflow.com/questions/7054685/are-destructors-run-when-calling-exit

Use GDB and put it in a global object destructor (PageManager) and also a locally defined one and examine the behaviour. You may need to manually call page manager's destructor and then that should take care of everything else

edwardUL99 commented 4 years ago

Resolved by adding a ExitSignal exception which is thrown in ui::quit and main catches it