If i have two different types of dynamic arrays, for example int **A and double **B. Can i build a one free function for both arrays, to free the memory. Something like this
void free_matrix(void **A,int row){
int i;
for(i=0;i<row;i++)
free(A[i]);
free(A);
}