title: Deleting a derived object via a pointer to its base class
body: <p>I have two classes, base_class and derived_class and the following code:</p>
  
  <pre><code>base_class *ptr = new derived_class;
  delete ptr;
  </code></pre>
  
  <p>Will this code produce a memory leak? If so, how should I deal with it?</p>