pedromelocf / 42_fdf

All programs that you wrote until now were executed in text mode on your terminal. Now, let’s discover something more exciting: how to open a graphics window and draw inside? To start your journey in graphic programming, FdF offers to represent “iron wire” meshing in 3D.
2 stars 0 forks source link

Deal with memmory allocation (free) #7

Closed pedromelocf closed 10 months ago

pedromelocf commented 10 months ago

Problem with split_result**

void    clean_split(char    **split_result)
{
    int x;

    x = 0;
    while(split_result[x])
        free(split_result[x++]);
    free(split_result);
}

Solved freeing all array content in x position; also matrix at end of loop.