Free scene memory at the end
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 6 Dec 2024 08:32:05 +0000 (09:32 +0100)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 6 Dec 2024 08:32:05 +0000 (09:32 +0100)
src/main.c

index 68e389107f48a87b23099e9d0cd7a7982007f486..d6ffc22c340074ca83495dc2e8743dc01d77e3a8 100644 (file)
@@ -187,6 +187,9 @@ void        cleanup(t_session *s)
 {
        mlx_destroy_image(s->mlx, s->img.img);
        free_session(s);
+       ft_vec_free(&s->scene.objects, NULL);
+       ft_vec_free(&s->scene.cameras, NULL);
+       ft_vec_free(&s->scene.lights, NULL);
        return ;
 }