sps.c
void table_dtor(Table *table) {
    for (unsigned i=0; i < table->rows; i++) {
        for (unsigned j=0; j < table->cols; j++) {
            cell_dtor(&table->cells[i][j]);
        }
        free(table->cells[i]);
    }

    free(table->cells);
    table->cells = NULL;

    table->rows = 0;
    table->cols = 0;
}
// deallocates all the pointers in the table structure
deallocates all the pointers in the table structure
deallocates all the pointers in the table structure
void table_dtor(Table *table) {
    for (unsigned i=0; i < table->rows; i++) {
        for (unsigned j=0; j < table->cols; j++) {
            cell_dtor(&table->cells[i][j]);
        }
        free(table->cells[i]);
    }
    free(table->cells);
    table->cells = NULL;
    table->rows = 0;
    table->cols = 0;
}
void table_dtor ( Table * table ) { for ( unsigned i = 0 ; i < table -> rows ; i ++ ) { for ( unsigned j = 0 ; j < table -> cols ; j ++ ) { cell_dtor ( & table -> cells [ i ] [ j ] ) ; } free ( table -> cells [ i ] ) ; } free ( table -> cells ) ; table -> cells = NULL ; table -> rows = 0 ; table -> cols = 0 ; }
deallocates all the pointers in the table structure
deallocates all the pointers in the table structure