Hacker News Viewer

What happens when a destructor throws

by jandeboevrie on 4/2/2026, 3:40:58 PM

https://www.sandordargo.com/blog/2026/04/01/when-a-destructor-throws

Comments

by: avalys

Don’t know who this guy is, but I’m glad I never interviewed with him. This is language-version-specific behavioral minutiae that anyone can look up in 5 minutes in the rare case it matters, and is otherwise irrelevant to engineering software at a senior level.<p>This article is a junior engineer’s idea of what a senior engineer should know.

4/7/2026, 3:15:10 AM


by: NooneAtAll3

I... I did not expect that noexcept(false) works on destructors

4/7/2026, 2:51:17 AM


by: zarzavat

There&#x27;s nothing essential to know about what happens when a destructor throws other than it&#x27;s bad and don&#x27;t do it. Especially if the effect is to terminate.<p>I hate this style of interviewing which is more about the interviewer feeling good about themselves rather than doing their job and assessing candidates. Just wastes everyone&#x27;s time all around.

4/7/2026, 3:40:05 AM


by: supliminal

No mention of vtables or thunks? We decided to proceed with another candidate.

4/7/2026, 2:44:45 AM