| 12345678910111213141516171819202122232425262728 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_memdel2.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@student.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2016/06/16 16:59:53 by bchanot #+# #+# */
- /* Updated: 2018/10/11 22:53:04 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- #include "stdlib.h"
- void ft_memdel2(void ***ap)
- {
- size_t i;
- if (ap != NULL && *ap != NULL)
- {
- i = -1;
- while ((*ap)[++i])
- ft_memdel((void **)&(*ap)[i]);
- free(*ap);
- *ap = NULL;
- }
- }
|