Stack unwinding call to destructor
<p>When some local varibles go out of scope, stack unwinding occurs. </p>

<p>Exactly how destructors are called? </p>

<p>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.</p>
