title: How to delete this 2-dimensional array of pointers? Making a destructor
body: <pre><code>malla = new Celula**[n + 2];  
  for(int i = 0 ; i &lt; n + 2 ; ++i){  
       malla[i] = new Celula*[m + 2];
       for(int j = 0 ; j &lt; m + 2 ; ++j){
           malla[i][j] = new Celula[m];
       }
  }
  </code></pre>
  
  <p>I'm making this code and I allocate memory like this (I want a <code>n*m</code> array of pointers to Celula, is okay? Now I need a destructor.</p>
  
  <p>Now I don't know how to access to an object in this array and: </p>
  
  <pre><code>malla[i][j].setestado(true);
  </code></pre>
  
  <p>doesn't work. </p>