I understand I'm splitting the array over the double pointer, but how can I deallocate if I lost the data track?
#include <stdio.h>
#include <stdlib.h>
#define width 20
#define height 20
void allocate_matrix(int ***matrix)
{
    double **local_matrix, *data;
    local_matrix = (double **)malloc(sizeof(double *) * height);
    data = (double *)malloc(sizeof(double) * width * height);
    for (int i = 0; i < height; i++)
    {
        local_matrix[i] = &(data[i * width]);
    }
    *matrix = local_matrix;
}
void deallocate_matrix(int **matrix) {
    
}
int main(void) {
    int **matrix;
    allocate_matrix(&matrix);
    deallocate_matrix(matrix);
    return 0;
}
 
     
     
    