fix: leak screen image buffer

This commit is contained in:
mcolonna 2024-10-17 17:44:39 +02:00
parent fa7e448c70
commit 88c3d128fd

3
algo.c
View file

@ -6,7 +6,7 @@
/* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */ /* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/01 16:24:58 by grobledo #+# #+# */ /* Created: 2024/10/01 16:24:58 by grobledo #+# #+# */
/* Updated: 2024/10/17 15:00:28 by mcolonna ### ########.fr */ /* Updated: 2024/10/17 17:43:07 by mcolonna ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -38,6 +38,7 @@ void draw_screen(void)
} }
render(img_data); render(img_data);
mlx_put_image_to_window(g_mlx, g_win, img_ptr, 0, 0); mlx_put_image_to_window(g_mlx, g_win, img_ptr, 0, 0);
mlx_destroy_image(g_mlx, img_ptr);
} }
void load_textures(t_tex *tex) void load_textures(t_tex *tex)