title: Overwriting a variable initialized with the new keyword c++
body: <p>If I do something like:</p>
  
  <pre><code>void foo() {
    bar* b2 = new bar();
    b2 = new bar();
  }
  </code></pre>
  
  <p>What happens to the first bar value initialized with <code>new</code>? Is it overwritten by the second assignment, or should it be deleted using the delete keyword beforehand?</p>