title: Virtual Default Destructors in C++
body: <p>I've got a large set of inherited classes (criteria) which inherit from a base class (criterion). Here's <code>criterion</code>'s code</p>
  
  <pre><code>class criterion
  {
  public:
      virtual unsigned __int32 getPriorityClass() const = 0;
      virtual BOOL include(fileData &amp;file) const = 0;
      virtual void reorderTree() = 0;
      virtual unsigned int directoryCheck(const std::wstring&amp; directory) const = 0;
      virtual std::wstring debugTree() const = 0;
  };
  </code></pre>
  
  <p>Some examples of derived classes from this one:</p>
  
  <pre><code>class fastFilter : public criterion
  {
  public:
      void reorderTree() {};
      unsigned int  directoryCheck(const std::wstring&amp; /*directory*/) const { return DIRECTORY_DONTCARE; };
      unsigned __int32 getPriorityClass() const { return PRIORITY_FAST_FILTER; };
  };
  
  class isArchive : public fastFilter
  {
  public:
      BOOL include(fileData &amp;file) const
      {
          return file.getArchive();
      }
      std::wstring debugTree() const
      {
          return std::wstring(L"+ ISARCHIVE\n");
      };
  };
  </code></pre>
  
  <p>Since I don't have a destructor here at all, but yet this is supposed to be a base class, do I need to insert an empty virtual destructor, I.e. like this?:</p>
  
  <pre><code>virtual void ~criterion() = 0;
  </code></pre>
  
  <p>If that virtual destructor declaration is needed, do all intermediate classes need one as well? I.e. would fastFilter above need a virtual destructor as well?</p>