CPU/CodeCache: Don't leak blocks on shutdown

This commit is contained in:
Connor McLaughlin 2020-04-16 20:23:54 +10:00
parent 7a87b9b5bb
commit a43a0a14cc
2 changed files with 5 additions and 2 deletions

View file

@ -19,7 +19,10 @@ static constexpr u32 RECOMPILER_FAR_CODE_CACHE_SIZE = 32 * 1024 * 1024;
CodeCache::CodeCache() = default;
CodeCache::~CodeCache() = default;
CodeCache::~CodeCache()
{
Flush();
}
void CodeCache::Initialize(System* system, Core* core, Bus* bus, bool use_recompiler)
{

View file

@ -254,8 +254,8 @@ void System::DestroyComponents()
m_gpu.reset();
m_interrupt_controller.reset();
m_dma.reset();
m_bus.reset();
m_cpu_code_cache.reset();
m_bus.reset();
m_cpu.reset();
}