Skip to content

Instantly share code, notes, and snippets.

@kanzash
Created January 26, 2017 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanzash/cf019271d731e2b6b8919904f7d81f93 to your computer and use it in GitHub Desktop.
Save kanzash/cf019271d731e2b6b8919904f7d81f93 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
void freeArray(int **array, int rows, int cols) {
int i = 0;
int j = 0;
for (i=0; i<rows; i++) {
for(j=0; j<cols; j++){
free (array[j]);
}
free(array[i]);
}
free(array);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment