fix(core): Properly release memory when stopping emulation

Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
Collecting
2026-01-09 04:42:27 +00:00
parent b3aefed75b
commit 24fe7ed36e

View File

@@ -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