title: How can I free all allocated memory at once?
body: <p>Here is what I am working with:</p>
  
  <pre><code>char* qdat[][NUMTBLCOLS];
  char** tdat[];
  char* ptr_web_data;
  
      // Loop thru each table row of the query result set
      for(row_index = 0; row_index &lt; number_rows; row_index++)
      {
          // Loop thru each column of the query result set and extract the data
          for(col_index = 0; col_index &lt; number_cols; col_index++)
          {
              ptr_web_data = (char*) malloc((strlen(Data) + 1) * sizeof(char));
              memcpy (ptr_web_data, column_text, strlen(column_text) + 1);
              qdat[row_index][web_data_index] = ptr_web_data;
          }
       }
  
      tdat[row_index] = qdat[col_index];
  </code></pre>
  
  <p>After the data is used, the memory allocated is released one at a  time using free().</p>
  
  <pre><code>for(row_index = 0; row_index &lt; number_rows; row_index++)
  { 
    // Loop thru all columns used
    for(col_index = 0; col_index &lt; SARWEBTBLCOLS; col_index++)
    {
      // Free memory block pointed to by results set array
      free(tdat[row_index][col_index]);
    }
  
  }
  </code></pre>
  
  <p>Is there a way to release all the allocated memory at once, for this array?</p>
  
  <p>Thank You.</p>