mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-26 12:43:29 +00:00
fix(core): Properly release memory when stopping emulation
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -383,4 +383,11 @@ std::optional<u32> MemoryAllocator::FindType(VkMemoryPropertyFlags flags, u32 ty
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
void MemoryAllocator::NukeAllAllocations() {
|
||||
// This calls the destructor for every MemoryAllocation slab.
|
||||
// Each slab contains a Vulkan handle that will now call vkFreeMemory.
|
||||
allocations.clear();
|
||||
allocations.shrink_to_fit();
|
||||
}
|
||||
|
||||
} // namespace Vulkan
|
||||
|
||||
Reference in New Issue
Block a user