title: Do you call delete in destructor in C++?
body: <p>Let say you have a class like this </p>
  
  <pre><code>  class Level
    {
      public:
  
       Level(std::string);
       ~Level();
  
      private:
       Bitmap* map;  
    }
  </code></pre>
  
  <p>and in the class you had this</p>
  
  <pre><code>Level::Level(std::string)
  {
    map = new Bitmap(path);
  }
  </code></pre>
  
  <p>Was wondering do can you call </p>
  
  <pre><code>Level::~Level()
  {
   delete map;
  }
  </code></pre>
  
  <p>As I was worried about if the class goes out of scope and I haven't deleted map. Then, wouldn't that cause a memory leak. Do I have to manually call to delete map. As I get crash if I call delete in the constructor in my program. </p>
  
  <p>Like I could add a method to Level called say destroy map where I delete map. But, was wondering why I can't add delete into the destructor. </p>