From b10505d08592900bfa52547d30c99471c469679f Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Fri, 5 Jan 2024 00:59:45 +0100 Subject: forgor free Signed-off-by: Anna (navi) Figueiredo Gomes --- main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.c b/main.c index 25f8bac..71d7cdc 100644 --- a/main.c +++ b/main.c @@ -224,9 +224,12 @@ void cleanup_swapchain() { for (size_t i = 0; i < framebuffers->len; i++) { vkDestroyFramebuffer(gpu, framebuffers->data[i], NULL); } + free(framebuffers); for (size_t i = 0; i < swapchain_image_views->len; i++) { vkDestroyImageView(gpu, swapchain_image_views->data[i], NULL); } + free(swapchain_image_views); + free(swapchain_images); vkDestroySwapchainKHR(gpu, swapchain, NULL); } @@ -617,6 +620,9 @@ void create_graphics_pipeline() { VkShaderModule vert_shader = create_shader_module(vert_shader_code); VkShaderModule frag_shader = create_shader_module(frag_shader_code); + free(vert_shader_code); + free(frag_shader_code); + VkPipelineShaderStageCreateInfo vert_shader_info = { .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, .stage = VK_SHADER_STAGE_VERTEX_BIT, @@ -1587,6 +1593,7 @@ void load_model() { continue; } } + free(line); fclose(fp); for (size_t i = 0; i < obj.faces.len; i++) { -- cgit v1.2.3