mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-27 05:03:29 +00:00
fix(core): Properly release memory when stopping emulation
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -322,4 +322,17 @@ void StagingBufferPool::ReleaseLevel(StagingBuffersCache& cache, size_t log2) {
|
||||
}
|
||||
}
|
||||
|
||||
void StagingBufferPool::Nuke() {
|
||||
auto nuke_cache = [](StagingBuffersCache& cache) {
|
||||
for (auto& level : cache) {
|
||||
level.entries.clear();
|
||||
level.entries.shrink_to_fit();
|
||||
}
|
||||
};
|
||||
nuke_cache(device_local_cache);
|
||||
nuke_cache(upload_cache);
|
||||
nuke_cache(download_cache);
|
||||
stream_buffer.reset();
|
||||
}
|
||||
|
||||
} // namespace Vulkan
|
||||
|
||||
Reference in New Issue
Block a user