title: What happens when I delete dynamic array?
body: <p>I made a dynamic array (example):</p>
  
  <pre><code>int *a;
  a = new int[3];
  a[0] = 10; a[1] = 20; a[2] = 30;
  </code></pre>
  
  <p>Than I create a vector which stores pointers:</p>
  
  <pre><code>vector&lt;int*&gt; pa;
  pa.push_back(&amp;a[0]);
  </code></pre>
  
  <p>After I deleted (freed) the memory with "delete[] a;", I can still access to the  element, that I push_backed. (cout &lt;&lt; *pa[0]; output: 10)</p>
  
  <p>Why is this happen? When I "delete[] a", it only deletes the pointer to the elements, but the elements are still accessable?</p>