-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfree.c
44 lines (39 loc) · 1.17 KB
/
free.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* free.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mohaben- <mohaben-@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/27 15:47:52 by mohaben- #+# #+# */
/* Updated: 2025/02/03 11:45:11 by mohaben- ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
void free_2d_array(t_point **grid, int height)
{
int i;
i = 0;
if (!grid)
return ;
while (i < height)
{
free(grid[i]);
i++;
}
free(grid);
grid = NULL;
}
void free_split(char **s)
{
int i;
if (!s)
return ;
i = 0;
while (s[i])
{
free(s[i]);
i++;
}
free(s);
}