title: destructing an object stored in the vector of pointers
body: <p>I have a class that contains pointers, the class inherits nothing</p>
  
  <pre><code>class MyClass
  {
  public:
  MyClass();
  ~MyClass();
  
  private:
  //i have pointers here
  };
  MyClass::~MyClass()
  {
  print("destroyed..");
  }
  </code></pre>
  
  <p>Now i have to use this class as a pointer in vector like this:</p>
  
  <pre><code>vector&lt;MyClass*&gt; classes;
  </code></pre>
  
  <p>Push some classes in here but when i remove an element:</p>
  
  <pre><code>classes.remove(index);
  </code></pre>
  
  <p>The destructor doesn't get called,and i think that I have a memory leak.<br>
  <strong>So how do i make it call the destructor</strong></p>