no leaks
This commit is contained in:
parent
b8e4e6d879
commit
247772a505
3
cmd
Normal file
3
cmd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
gcc -I ./mlx -I ./libft -o main.o -c main.c
|
||||||
|
gcc -o main main.o -L ./mlx -lmlx -lXext -lX11 -L ./libft -lft
|
||||||
|
|
||||||
11
main.c
11
main.c
@ -1,4 +1,6 @@
|
|||||||
#include <mlx.h>
|
//#include <mlx.h>
|
||||||
|
#include "./mlx/mlx.h"
|
||||||
|
#include "./mlx/mlx_int.h"
|
||||||
#include "./libft/libft.h"
|
#include "./libft/libft.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -25,14 +27,17 @@ void quit_game(t_data *img)
|
|||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
j = 0;
|
||||||
printf("quit game\n");
|
printf("quit game\n");
|
||||||
image = mlx_new_image(img->mlx, 13 * 32, 10 * 32);
|
//image = mlx_new_image(img->mlx, 13 * 32, 10 * 32);
|
||||||
//mlx_put_image_to_window(img->mlx, img->mlx_win, image, 0, 0)
|
//mlx_put_image_to_window(img->mlx, img->mlx_win, image, 0, 0)
|
||||||
mlx_clear_window(img->mlx, img->mlx_win);
|
mlx_clear_window(img->mlx, img->mlx_win);
|
||||||
mlx_destroy_window(img->mlx, img->mlx_win);
|
mlx_destroy_window(img->mlx, img->mlx_win);
|
||||||
|
|
||||||
|
|
||||||
|
mlx_destroy_display(img->mlx);
|
||||||
if (img->mlx)
|
if (img->mlx)
|
||||||
free(img->mlx);
|
free(img->mlx);
|
||||||
//if (img->mlx_win)
|
//if (img->mlx_win)
|
||||||
//free(img->mlx_win);
|
// free(img->mlx_win);
|
||||||
while (img->map_tab[i])
|
while (img->map_tab[i])
|
||||||
free(img->map_tab[i++]);
|
free(img->map_tab[i++]);
|
||||||
//if (img->map_tab);
|
//if (img->map_tab);
|
||||||
|
|||||||
1
mlx
Submodule
1
mlx
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 7dc53a411a7d4ae286c60c6229bd1e395b0efb82
|
||||||
Loading…
Reference in New Issue
Block a user