title: object's scope within destructor
body: <p>I am trying to understand Destructor. I got following issue. Here in the below snippet why the object b2 is out of scope for Destructor ?</p>
  
  <pre><code>class D
  {
     B *b1;
     public:
     D()
     {
         b1 = new B;
         B *b2=new B;
         cout&lt;&lt;"D's Constructor Invoked"&lt;&lt;endl;
         //delete b2;
     }
     ~D()
     {
         delete b1;
         delete b2;  // error : undeclared identifier
         cout&lt;&lt;"D's Destructor Invoked"&lt;&lt;endl;
     }
  };
  </code></pre>
  
  <p>B is just a simple class.</p>
  
  <p>Thanks</p>