title: Is there a use for making a protected destructor virtual?
body: <pre><code>/*Child is inherited from Parent*/
  class Parent {  
    public:  
      Parent () //Constructor
      {
          cout &lt;&lt; "\n Parent constructor called\n" &lt;&lt; endl;
      }
    protected:
      ~Parent() //Dtor
      {
          cout &lt;&lt; "\n Parent destructor called\n" &lt;&lt; endl;
      }
  };
  
  class Child : public Parent 
  {
    public:
      Child () //Ctor
      {
          cout &lt;&lt; "\nChild constructor called\n" &lt;&lt; endl;
      }
      ~Child() //dtor
      {
          cout &lt;&lt; "\nChild destructor called\n" &lt;&lt; endl;
      }
  };
  
  int main ()
  {
      Parent * p2 = new Child;          
      delete p2;
      return 0;
  }
  </code></pre>
  
  <p>If I make <code>Parent</code>'s destructor virtual, then I obtain an error, so what is the purpose of making a protected destructor virtual?</p>