title: new[n] and delete every location with delete instead the whole chunk with delete[]
body: <p>Is this valid C++ (e.g. not invoking UB) and does it achieve what I want without leaking memory? valgrinds complains about mismatching <code>free</code> and <code>delete</code> but says "no leaks  are possible" in the end.</p>
  
  <pre><code>int main() {
    int* a = new int[5];
    for(int i = 0; i &lt; 5; ++i)
      a[i] = i;
  
    for(int i = 0; i &lt; 5; ++i)
      delete &amp;a[i];
  }
  </code></pre>
  
  <p>The reason I'm asking: I have a class that uses <code>boost::intrusive::list</code> and I <code>new</code> every object that is added to that list. Sometimes I know how many objects I want to add to the list and was thinking about using <code>new[]</code> to allocate a chunk and still be able to <code>delete</code> every object on its own with the Disposer-style of <code>boost::intrusive</code>.</p>