mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-08 07:51:19 +12:00
Vulkan: Manage ownership of memory manager with unique_ptr
This commit is contained in:
parent
4581281a19
commit
d6a5693aa0
2 changed files with 6 additions and 6 deletions
|
@ -439,7 +439,7 @@ VulkanRenderer::VulkanRenderer()
|
|||
GetDeviceFeatures();
|
||||
|
||||
// init memory manager
|
||||
memoryManager = new VKRMemoryManager(this);
|
||||
memoryManager.reset(new VKRMemoryManager(this));
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -679,6 +679,9 @@ VulkanRenderer::~VulkanRenderer()
|
|||
vkDestroyDebugUtilsMessengerEXT(m_instance, m_debugCallback, nullptr);
|
||||
}
|
||||
|
||||
// destroy memory manager
|
||||
memoryManager.reset();
|
||||
|
||||
// destroy instance, devices
|
||||
if (m_instance != VK_NULL_HANDLE)
|
||||
{
|
||||
|
@ -690,9 +693,6 @@ VulkanRenderer::~VulkanRenderer()
|
|||
vkDestroyInstance(m_instance, nullptr);
|
||||
}
|
||||
|
||||
// destroy memory manager
|
||||
delete memoryManager;
|
||||
|
||||
// crashes?
|
||||
//glslang::FinalizeProcess();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue