title: Must new always be followed by delete?
body: <p>I think we all understand the necessity of <code>delete</code> when reassigning a dynamically-allocated pointer in order to prevent memory leaks. However, I'm curious, to what extent does the C++ mandate the usage of <code>delete</code>? For example, take the following program</p>
  
  <pre><code>int main()
  {
       int* arr = new int[5];
       return 0;
  }
  </code></pre>
  
  <p>While for all intents and purposes no leak occurs here (since your program is ending and the OS will clean up all memory once it returns), but does the standard still require -- or recommend -- the usage of <code>delete[]</code> in this case? If not, would there be any other reason why you would <code>delete[]</code> here?</p>