diff --git a/Makefile b/Makefile index ff55b90..8c230da 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ RUN_CMD := ./$(NAME) test_maps/valid_tex.cub # CFLAGS += -Wall -Wextra -Werror CFLAGS += -Wall -Wextra -# CFLAGS += -g -fsanitize=address +CFLAGS += -g -fsanitize=address # CFLAGS += -g # CFLAGS += -Ofast -flto -march=native diff --git a/src/utils/free.c b/src/utils/free.c index 1e5262f..cf7f5fa 100644 --- a/src/utils/free.c +++ b/src/utils/free.c @@ -6,7 +6,7 @@ /* By: yzaim +#+ */ /* +#+ */ /* Created: 2024/01/08 15:53:55 by yzaim #+# #+# */ -/* Updated: 2024/01/08 15:55:28 by yzaim ######## odam.nl */ +/* Updated: 2024/01/17 16:13:14 by yzaim ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -18,6 +18,10 @@ static void free_t_tex(t_attr *attributes) free(attributes->s.tex_path); free(attributes->e.tex_path); free(attributes->w.tex_path); + mlx_delete_texture(attributes->n.tex); + mlx_delete_texture(attributes->s.tex); + mlx_delete_texture(attributes->e.tex); + mlx_delete_texture(attributes->w.tex); } void meta_free(t_meta *meta)