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:48:01 +00:00
parent e150d1e910
commit 1a8e019e36

View File

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