Handle deinitialisation

This commit is contained in:
2023-09-24 20:27:34 +02:00
parent 5b5f18b9a8
commit 5dfc2de985
3 changed files with 6 additions and 2 deletions

View File

@@ -239,7 +239,6 @@ namespace openVulkanoCpp::AR
ArRecorder::AsyncProcessor::~AsyncProcessor() ArRecorder::AsyncProcessor::~AsyncProcessor()
{ {
requestExit = true; requestExit = true;
queueMutex.lock();
newDataAvailable.notify_one(); newDataAvailable.notify_one();
if (processingThread.joinable()) processingThread.join(); if (processingThread.joinable()) processingThread.join();
} }

View File

@@ -79,4 +79,4 @@ namespace openVulkanoCpp::Vulkan
dynamicDispatch.init(instance, &vkGetInstanceProcAddr, device->device, &vkGetDeviceProcAddr); dynamicDispatch.init(instance, &vkGetInstanceProcAddr, device->device, &vkGetDeviceProcAddr);
Logger::RENDER->info("Found device: {0}", device->GetDeviceName()); Logger::RENDER->info("Found device: {0}", device->GetDeviceName());
} }
} }

View File

@@ -104,6 +104,11 @@ namespace openVulkanoCpp::Vulkan
vk::MemoryPropertyFlags properties; vk::MemoryPropertyFlags properties;
void* mapped = nullptr; void* mapped = nullptr;
~ManagedBuffer()
{
allocation->device.destroy(buffer);
}
[[nodiscard]] bool IsLast() const [[nodiscard]] bool IsLast() const
{ {
return (offset + size == allocation->used); return (offset + size == allocation->used);