Forgetting to delete leads to memoryleaks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user