When some local varibles go out of scope, stack unwinding occurs.
Exactly how destructors are called?
I want to know the mechanism through which compiler is able to call destructors of the objects that are on stack and not of the objects that are on heap.