summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-01-05 00:59:45 +0100
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-01-05 00:59:50 +0100
commitb10505d08592900bfa52547d30c99471c469679f (patch)
treef6ccf02492b9e88209e65be4faed438163d2a3a1 /main.c
parent4c62423e8060297902e0f2317495824d94a6d53b (diff)
forgor freeHEADmain
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 7 insertions, 0 deletions
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++) {