Added some missed cleanup functions to plug a few memory leaks

This commit is contained in:
Conál 2024-02-21 11:38:45 -05:00
parent e85882df04
commit 5ffdc17d79

View File

@ -228,6 +228,8 @@ Renderer::Renderer(Window& win) : win(win) {
box_pipeline = std::make_unique<GraphicsPipeline>(dev, box_shaders, swapchain->extent, *render_pass, bindings, box_buffer->binding(0), box_buffer->attrs(0), GraphicsPipeline::Type::eBOX);
box_pipeline->update(0, *uniform_buffer);
for (auto& shader : box_shaders)
shader.cleanup();
for (auto& shader : bsp_shaders)
shader.cleanup();
@ -414,6 +416,10 @@ Renderer::~Renderer() {
ui.reset();
bsp.reset();
box_buffer.reset();
box_pipeline.reset();
uniform_buffer.reset();
for (auto& tex : textures) {
tex.cleanup();