Forgetting to delete leads to memoryleaks

This commit is contained in:
Dynamitos
2023-11-07 16:55:13 +01:00
parent 46a0befb80
commit ecb5050dc7
29 changed files with 178 additions and 173 deletions
-14
View File
@@ -61,20 +61,6 @@ Buffer::Buffer(PGraphics graphics, uint64 size, VkBufferUsageFlags usage, Gfx::Q
Buffer::~Buffer()
{
//PCmdBuffer cmdBuffer = graphics->getQueueCommands(owner)->getCommands();
//VkDevice device = graphics->getDevice();
//auto deletionLambda = [cmdBuffer, device](VkBuffer) -> void
//{
// //co_await cmdBuffer->asyncWait();
// //vkDestroyBuffer(device, buffer, nullptr);
// //co_return;
//};
//for (uint32 i = 0; i < numBuffers; ++i)
//{
// deletionLambda(buffers[i].buffer);
// buffers[i].allocation = nullptr;
//}
graphics = nullptr;
}
VkDeviceSize Buffer::getOffset() const