Hi,
How can I free the memory allocated dynamically to an array as follows. I can't find any reference to the use of "free" for this type dynamic allocation. Thank you.
t_shift_table = (int ***)malloc(num_shift_type*sizeof(int**));
for(i=0;i<num_shift_type;++i){
kk = nshifts;
t_shift_table = (int **)malloc(kk*sizeof(int*));
for(j=0;j<nshifts;++j){
t_shift_table[j] = (int *)malloc(tour_length*sizeof(int));
}
}
Regards,
Taykin
How can I free the memory allocated dynamically to an array as follows. I can't find any reference to the use of "free" for this type dynamic allocation. Thank you.
t_shift_table = (int ***)malloc(num_shift_type*sizeof(int**));
for(i=0;i<num_shift_type;++i){
kk = nshifts;
t_shift_table = (int **)malloc(kk*sizeof(int*));
for(j=0;j<nshifts;++j){
t_shift_table[j] = (int *)malloc(tour_length*sizeof(int));
}
}
Regards,
Taykin