title: Delete a pointer to pointer (as array of arrays)
body: <p>I have this in my code:      </p>
  
  <pre><code>double** desc = new double* [size_out];
  for (int i = 0; i &lt; size_out; i++)
      desc[i] = new double [size_in];
  </code></pre>
  
  <p>How do I delete this <code>desc</code>?</p>
  
  <p>Should I do:</p>
  
  <pre><code>delete [] desc;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>for (int i=0; i&lt;size_out; i++)
      delete [] desc[i];
  delete [] desc;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>for (int i=0; i&lt;size_out; i++)
      delete [] desc[i];
  delete desc;
  </code></pre>
  
  <p>?</p>