title: De-allocating 2D array of objects
body: <p>I am still new to C++ pointers and would feel great if someone can help me out with this situation here:</p>
  
  <pre><code>while( true)
  {
  
  //some input
  
  //if input is QUIT it quits the program
  
  // some code to calculate how many House objects we need
  
   House** houses = new House *[numOfHouses];
  
  
  //some more code 
  
  
  }
  </code></pre>
  
  <p>Can someone please guide me on how to de-allocate houses (2D array) in this situation?</p>
  
  <p>If my loop runs once and user enters QUIT in the second iteration, I get 8 bytes lost on valgrind check.</p>
  
  <p>If my loop runs twice and user enters QUIT in the third aeration, I get 16 bytes lost on valgrind check.</p>
  
  <p>Thanks</p>