From 75b8ce467ec35eea4d063f6bd85460253edf3d4f Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 24 Mar 2020 14:33:06 +0100 Subject: Ram issues fixed --- src/ft_raycasting.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index e83c8f7..1804118 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -178,21 +178,21 @@ void pthread_join(tid[0], 0x0); pthread_join(tid[1], 0x0); x = 0; - y = 0; while (x < 2) { + y = 0; while (y < cl->wlist.y_size) { - free(cl->rlist.fc_tex_x_tab[x][y]); - free(cl->rlist.fc_tex_y_tab[x][y]); + ft_memdel((void*)&cl->rlist.fc_tex_x_tab[x][y]); + ft_memdel((void*)&cl->rlist.fc_tex_y_tab[x][y]); y++; } - free(cl->rlist.fc_tex_x_tab[x]); - free(cl->rlist.fc_tex_y_tab[x]); + ft_memdel((void*)&cl->rlist.fc_tex_x_tab[x]); + ft_memdel((void*)&cl->rlist.fc_tex_y_tab[x]); x++; } - free(cl->rlist.fc_tex_x_tab); - free(cl->rlist.fc_tex_y_tab); + ft_memdel((void*)&cl->rlist.fc_tex_x_tab); + ft_memdel((void*)&cl->rlist.fc_tex_y_tab); ft_memdel((void*)&cl->rlist.tex_x_tab); ft_memdel((void*)&cl->rlist.row_dist_tab); ft_memdel((void*)&cl->rlist.wall_t_tab); -- cgit v1.2.3