libft
|
Go to the source code of this file.
Functions | |
void | ft_lstdelone (t_list **alst, void(*del)(void *, size_t)) |
Deletes one link of a list. More... | |
void ft_lstdelone | ( | t_list ** | alst, |
void(*)(void *, size_t) | del | ||
) |
Deletes one link of a list.
Takes as a parameter a link’s pointer address and frees the memory of the link’s content using the function del
given as a parameter, then frees the link’s memory using free
. The memory of next must not be freed under any circumstance. Finally, the pointer to the link that was just freed must be set to NULL
(quite similar to the function memdel
).
alst | The adress of a pointer to a link 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_lstdelone.c.