From 7a87b9b5bb31aede75fb3d23bea1b56d25c37674 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 16 Apr 2020 19:40:52 +1000 Subject: [PATCH] CPU/CodeCache: Don't leak blocks on flush --- src/core/cpu_code_cache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index f8d7e4c55..b0ec893b1 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -142,6 +142,8 @@ void CodeCache::Flush() for (auto& it : m_ram_block_map) it.clear(); + for (const auto& it : m_blocks) + delete it.second; m_blocks.clear(); #ifdef WITH_RECOMPILER m_code_buffer->Reset();