mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-15 09:10:46 -04: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;
|
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
|
} // namespace Vulkan
|
||||||
|
|||||||
Reference in New Issue
Block a user