title: Do you have to delete global dynamic arrays in c++
body: <p>I have a dynamic array i declare globally:</p>
  <pre><code>double * numbers;
  </code></pre>
  <p>I then initialize inside a function</p>
  <pre><code>numbers = new double[TotalNums]
  </code></pre>
  <p>I use this array from the beginning to the end of my program, do I NEED to delete it before exit, or is it just recommended to? I get no errors if i don't and i assume the OS frees up the memory after termination automatically.</p>