title: 3D Array de-allocation gives segmentation fault
body: <p>I am making use of a three dimensional array. I am declaring it like this:</p>
  
  <pre><code>int (*DoubleStride_StateTable)[255][255] = new int[StateTable_length][255][255];
  </code></pre>
  
  <p>and I deallocate the 3D array  like this:</p>
  
  <pre><code>for( int i = 0 ; i &lt; 255 ; i++ )
  {
      for( int j = 0 ; j &lt; 255 ; j++ )
      {
          cout &lt;&lt; i &lt;&lt; " " &lt;&lt; j &lt;&lt; endl;
          delete[] DoubleStride_StateTable[i][j] ;
      }
      delete[] DoubleStride_StateTable[i] ;
  }
  delete[] DoubleStride_StateTable;
  </code></pre>
  
  <p>The loop runs just two times i.e</p>
  
  <pre><code>i=0 j=0
  i=0 j=1
  </code></pre>
  
  <p>and afterwards a segmentation faults occurs</p>
  
  <p>Am I doing correct deallocation? Why is this error occurring ?</p>