-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstdelone.c
33 lines (29 loc) · 1.16 KB
/
ft_lstdelone.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ael-haib <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/11 19:49:12 by ael-haib #+# #+# */
/* Updated: 2024/02/21 19:19:47 by ael-haib ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/* void leaks()
{
system("leaks -q main");
} */
void ft_lstdelone(t_list *lst, void (*del)(void *))
{
del(lst->content);
free(lst);
}
/* int main()
{
atexit(leaks);
char *s2 = strdup("123");
t_list * s = ft_lstnew(s2);
ft_lstdelone(s, free);
//free(s2);
} */