mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-20 11:34:29 -04: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
|
} // namespace Vulkan
|
||||||
|
|||||||
Reference in New Issue
Block a user