regler leak dans exit

This commit is contained in:
H3XploR
2025-02-25 19:09:14 +01:00
parent 029c8dcc70
commit 5a7424600d
7 changed files with 116 additions and 9 deletions
+4 -1
View File
@@ -6,7 +6,7 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/17 19:22:27 by yantoine #+# #+# */
/* Updated: 2025/02/25 15:38:46 by yantoine ### ########.fr */
/* Updated: 2025/02/25 19:06:52 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
@@ -22,6 +22,7 @@ int key_press(int keycode, t_app *app)
mlx_destroy_window(app->mlx, app->win);
mlx_destroy_display(app->mlx);
free(app->mlx);
free(app->scene.all_file);
exit(0);
}
return (0);
@@ -35,6 +36,8 @@ int handle_close(void *param)
mlx_destroy_image(app->mlx, app->img);
mlx_destroy_window(app->mlx, app->win);
mlx_destroy_display(app->mlx);
ft_free_array(app->scene.all_file);
free(app->scene.all_file);
free(app->mlx);
exit(0);
return (0);