title: Qt 3D-array with Qt-Objekts like QVector
body: <p>How can I create a 3D-array only with Qt-Objects? The array should be a 3D-integer-array. I have tried to create a standard 3D-array on the heap. To allocate the memory on the heap works fine. I got an error if i want to deallocate the memory.</p>
  
  <pre><code>const int scalefaktor = 16;
  int*** anzPixel3d = new int**[256/scalefaktor];
  
  for (int i = 0; i &lt;= 256/scalefaktor ; i++)
  {
      anzPixel3d[i] = new int*[256/scalefaktor];
  
      for (int k = 0; k &lt;= 256/scalefaktor ; k++)
      {
          anzPixel3d[i][k] = new int[256/scalefaktor];
      }
  
  }
  
  
  
  
  
  for (int j = 0; j &lt;= 256/scalefaktor ; j++)
  {
  
  
      for (int m = 0; m &lt;= 256/scalefaktor ; m++)
      {
          delete [] anzPixel3d[j][m];
      }
  
      delete [] anzPixel3d[j];
  }
  delete [] anzPixel3d;
  </code></pre>
  
  <p>For this project I use Qt4.8 and the Qt-Creator 2.7.0. 
  I use the MSVC2010 compiler.</p>
  
  <p>The error-message is: HEAP CORRUPTION DETECTED: after Normal block (#31715) at 0x006E3C0. CRT detected that the application wrote to memory after end of heap buffer.</p>