Is it necessary to call delete[] vs delete for char arrays?
<p>I'm utilizing a library written by a collegue and discovered that <code>valgrind</code> was spewing out errors related to the <code>delete</code>.</p>

<p>The problem was that there were allocations of char arrays like</p>

<pre><code>char* s = new char[n];
</code></pre>

<p>followed up later with <code>delete s</code></p>

<p>instead of <code>delete[] s</code></p>

<p>He tells me that the difference is really that <code>delete[] s</code> will call a destructor for the object at each position in <code>s</code> (if it has one), in this case it doesn't because it's a primitive type.  I believe that is true.</p>

<p>So delete s is not really a bug as such and <code>valgrind</code> is just being very thorough.  </p>

<p>Will it still definitely free all the memory associated with <code>s</code>?</p>
