summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++) {