title: does delete[ ] deep deletes a structure in C++?
body: <p>Suppose if I have an array of structures which in turn has dynamically allocated arrays in them, does delete[] deep deletes everything I said above?</p>
  
  <p>For example, Consider I have this structure:</p>
  
  <pre><code>struct A
  {
    char* name;
    float* data;
    int** image;
  };
  </code></pre>
  
  <p>some place in my code I create</p>
  
  <pre><code>A** array = new A[n];
  </code></pre>
  
  <p>and I allocate memory for all structures in my array by</p>
  
  <pre><code>for(int i=0; i&lt;n; i++)
  {
    array[i] = new A;
  }
  </code></pre>
  
  <p>then some place else similarly populate the contents of the struct (creating name, data and image using malloc/new).</p>
  
  <p>Now if I say <code>delete[] array;</code>, will all the memory allocated so far ( for char*, float*, int**, structure and the array) get destroyed?</p>