title: In C++ Inheritance, Derived class destructor not called when pointer object to base class is pointed to derived class
body: <p>I am a newbie and I know this is a very basic concept and might be a duplicate too.
  Is it not true that once a constructor is called its corresponding destructor has to be called?
  [code run on Dev C++]</p>
  
  <pre><code>class Base
      {
       public:
              Base() { cout&lt;&lt;"Base Constructor\n";}
              int b;
       ~Base() {cout &lt;&lt; "Base Destructor\n"; }
      };
  
  class Derived:public Base
  {
   public:
          Derived() { cout&lt;&lt;"Derived Constructor\n";}
          int a;
   ~Derived() { cout&lt;&lt; "Derived Destructor\n"; }
  }; 
  int main () {
  Base* b = new Derived;    
  //Derived *b = new Derived;
   delete b;
      getch();
      return 0;
  }
  </code></pre>
  
  <p>GIVES OUTPUT</p>
  
  <pre><code>Base Constructor
  Derived Constructor
  Base Destructor
  </code></pre>