CPU/CodeCache: Don't leak blocks on flush

This commit is contained in:
Connor McLaughlin 2020-04-16 19:40:52 +10:00
parent 86df077ffe
commit 7a87b9b5bb
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ void CodeCache::Flush()
for (auto& it : m_ram_block_map) for (auto& it : m_ram_block_map)
it.clear(); it.clear();
for (const auto& it : m_blocks)
delete it.second;
m_blocks.clear(); m_blocks.clear();
#ifdef WITH_RECOMPILER #ifdef WITH_RECOMPILER
m_code_buffer->Reset(); m_code_buffer->Reset();