libft
|
Go to the source code of this file.
Functions | |
void | ft_lstdel (t_list **alst, void(*del)(void *, size_t)) |
Deletes all links in a list. More... | |
void ft_lstdel | ( | t_list ** | alst, |
void(*)(void *, size_t) | del | ||
) |
Deletes all links in a list.
Takes as a parameter the address of a pointer to a link and frees the memory of this link and every successors of that link using the functions del
and free
. Finally the pointer to the link that was just freed must be set to NULL
(quite similar to the function memdel
).
alst | The address of a pointer to the first link of a list that needs to be freed. |
del | The address of a function to apply to each link of a list. |
Definition at line 29 of file ft_lstdel.c.