Altium Limited Interview Question

They typed two class hierarchy with constructor/destructors. Derived class had an exception in constructor. Then they asked me to say which functions will be called in what order. All subsequent questions were around throwing an exception.

Interview Answer

Anonymous

Aug 19, 2020

I forgot that when you throw an exception from a derived class constructor, the parent class's destructor will still be called.