Herb's Destructor
What this preview is
Herb's Destructor is a cooked quant interview question on language knowledge in Cpp.
- Difficulty
- Cooked
- Topic
- Language Knowledge
- Discipline
- Quant development
- Language
- Cpp
- Companies
- 0
What this C++ destructor design question tests
This is a straightforward question about modern C++ best practices for base class destructors. It targets the kind of language-knowledge depth that firms expect from candidates claiming solid C++ experience, especially those working on financial systems or performance-critical codebases where memory management is non-negotiable.
The question draws on guidance from Herb Sutter, a leading C++ standards expert, and probes whether you understand the trade-offs and correctness principles that govern how destructors should be declared in inheritance hierarchies. Getting this right is essential for writing robust polymorphic code and avoiding subtle bugs.
- Virtual versus non-virtual destructors
- Access qualifiers and their role in preventing misuse
- Polymorphic type design and resource cleanup
Related learning resources
- Daily C++ Interview:
- LearnCpp
Related practice
Unlock full access to getcracked
Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.