title: Destructor not being called
body: <p>According to: <a href="http://www.cplusplus.com/doc/tutorial/classes/" rel="nofollow">http://www.cplusplus.com/doc/tutorial/classes/</a></p>
  
  <p>The destructor fulfills the opposite functionality of the constructor. It is automatically called when an object is destroyed, either because its scope of existence has finished (for example, if it was defined as a local object within a function and the function ends) or because it is an object dynamically assigned and it is released using the operator delete.</p>
  
  <p>Example code:</p>
  
  <pre><code>    class Something
      {
      public:
          Something() {cout &lt;&lt; "construction called" &lt;&lt; endl; }
          ~Something()    { cout &lt;&lt; "destruction called" &lt;&lt; endl; }
      };
  
  
      void foo(){
          Something *ob = new Something();
      }
  
      int _tmain(int argc, _TCHAR* argv[])
      {
          foo();
      }
  </code></pre>