O'Reilly logo
  • kunsheng chen thinks this is interesting:

When one is found, the stack is stripped back to the stack level that defines the catch handler by unwinding all intermediate stack frames. Stack unwinding means that the destructors for all locally-scoped names are called and all code remaining in each function past the current point of execution is skipped.


Cover of Professional C++, 3rd Edition


So all local stack variables’ destructors are called, but for memory in heap this is not the case.