title: What does empty destructor do?
body: <p>I heard that empty destructor doesn't do anything and calling it doesn't remove the object.
  But in the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;set&gt;
  
  
  class a
  {
  public:
      ~a() 
      {}
  std::set &lt;int&gt; myset;
  };
  
  int main()
  {
  a object;
  object.myset.insert(55);
  object.~a();
  object.myset.insert(20);
  std::cout &lt;&lt; object.myset.size();
  }
  </code></pre>
  
  <p>I get:
  "<strong>* glibc detected *</strong> /.app: double free or corruption (fasttop):" and then "ABORT".</p>
  
  <p>If it matters I have c++11 flag enabled. So what does empty constructor actually do? It does something and I read it doesn't.</p>