Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The other way to prevent all destructors running is _exit(0);

I tend to add that to software I write inside an #ifdef NDEBUG.

The OS does the work faster.



std::quick_exit() also works, though you can decide if it's worthwhile to allow parts of the program to register functions to be called at quick exit time.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: