title: Correct way to allocate and free arrays of pointers to arrays
body: <p>I want to create an array of pointers to arrays of 3 floats. What is the correct way to do this?</p>
  
  <pre><code>float *array1[SIZE]; // I think it is automatically allocated
  // OR
  float **array1 = calloc(SIZE, sizeof(float*));
  free(array1);
  
  for (int i = 0; i &lt; SIZE; i++) {
      array1[i] = (float[]){0,0,0};
      // OR
      array1[i] = calloc(3, sizeof(float));
  }
  </code></pre>
  
  <p>Then how would I free the data? I'm pretty sure just <code>free(array1);</code> wouldn't work, so would I free each pointer in the array then free the array, or since I allocated three floats, would I free each float, then each 3 float array, then the whole array???</p>