regler leak dans exit
This commit is contained in:
+4
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user