title: Doesn't putting a "virtual destructor inside an interface" make it, by definition, not an interface anymore?
body: <p>So here is the box I am in.  I want to understand why it is important to have a "virtual destructor inside your interface class".  You will see why that stuff is in quotes if you can hang to the end...  I also want to get all the vocabulary absolutely correct.  Here is where I am at with the process so far:</p>
  
  <ol>
  <li><p>Sometimes you have base classes, sometimes you have derived classes which inherit from base classes.</p></li>
  <li><p>If you have a base-pointer that finds itself pointing to a derived-object, and further you want a member function call made from that base-pointer-pointing-to-a-derived-object to behave as if it had actually been called from the derived object, then the member function you call had better be declared virtual in the base class.</p></li>
  <li><p>An interface is any class with <strong>only</strong> pure virtual functions.  If you derive a new class from this interface class and implement all the pure virtual functions, then you can finally create an instance of the derived class.  </p></li>
  <li><p>You can never have an instance of an interface class, BUT you can have an instance of a pointer-to-interface-class.</p></li>
  <li><p>In the case where you have a pointer-to-interface-class that actually points to an object of the derived class (actually, I guess it would always have to if #4 is correct), and if you decide to delete that object through your pointer, then if you don't have a "virtual destructor inside your interface class", your intention to destroy the derived object will only be executed as a call to destroy the base object (i.e. the interface class) and since there is no virtual destructor, things won't ever get to the point where the destructor for the derived object is actually called -- thus causing memory leaks.</p></li>
  </ol>
  
  <p>Phew.  Okay, if that sounds right, onto my question.  Is it enough just to declare a virtual destructor inside your interface like this:</p>
  
  <pre><code>virtual ~iFace();
  </code></pre>
  
  <p>That looks wrong to me...  so what happens if you make the destructor pure virtual like this:</p>
  
  <pre><code>virtual ~iFace() = 0;
  </code></pre>
  
  <p>Since they are just declarations, do either of these count for being a "virtual destructor inside your interface class"?  Can you even have a declared but un-defined destructor?  Only if it is pure virtual I would guess... </p>
  
  <p>Anyway, so getting back to the title question...  I really am going as fast as I can...  Here is the money shot...  If your "virtual destructor inside your interface class" requires at least an empty definition like this:</p>
  
  <pre><code>virtual ~iFace() {};
  </code></pre>
  
  <p>Then that member function is not pure virtual (can't be because you gave it a definition) and therefore your class is no longer an interface (it does not <strong>only</strong> contain pure virtual member functions).</p>
  
  <p>This would imply that if you define a virtual destructor for your interface, then you no longer have an interface (but just some abstract base class).  Is this just an abuse of language?  Do I understand what is going on?</p>
  
  <p>note:  All this came from asking myself "What is an interface?" and then reading this question's answers:  <a href="https://stackoverflow.com/questions/318064/how-do-you-declare-an-interface-in-c">How do you declare an interface in C++?</a></p>
  
  <p>Hope that wasn't too long a walk for too short a ride, but I am determined to completely understand these concepts and their associated vocabulary.  </p>