title: Destructor for primitive type dynamically allocated array?
body: <p>If I want to delete a dynamically allocated array of primitive type values: </p>
  
  <p><code>int *it = new int[10]</code> </p>
  
  <p>do I just put <code>delete [] it</code> in the destructor to take care of releasing memory properly?</p>
  
  <p>OR</p>
  
  <p>Realizing that, as a pointer is a primitive type, does deleting a dynamically allocated array involve doing something like this in the destructor:</p>
  
  <pre><code>for (size_t idx = 0; idx != 5; ++idx)
          delete sp[idx];
      delete[] sp;
  </code></pre>
  
  <p>I'm rather confused about this as I am having a lot of memory related errors in my program.</p>