What do you mean by stack unwinding? - C++

What do you mean by stack unwinding?

Stack unwinding is a process of calling all destructors for all automatic objects constructed at run time when an exception is thrown. Destructors are called between the places where the exception was thrown and where it is caught.

What do you mean by stack unwinding?

When an exception is thrown, C++ calls destructors to destroy all the objects formed since the beginning of the try block. The objects are destroyed in the reverse order of their formation. This process is called Stack unwinding.
What is the use of ‘using’ declaration?
What is the use of ‘using’ declaration? - In using-declaration, we have using keyword followed by a fully qualified name...
What is the difference between Mutex and Binary semaphore? - C++
Difference between Mutex and Binary semaphore - Semaphore synchronizes processes where as mutex synchronizes threads...
What is the scope resolution operator? - C++
What is the scope resolution operator? - Scope resolution operator allows a program to reference an identifier in the global...
Post your comment