Hot interview questions: 02 – Stack Unwinding

Categories: Programming

Stack unwinding is strictly related to exceptions. Let’s consider the following example: in this example, in the div method, we see that when the divisor is zero an exception is raised. Different things happen here: In the div’s caller once the exception is cached the destructor of every (automatic) object (i.e.: allocated on the stack) is … Read More