Make sure to dispose the page table and ThreadContext

Less memory leaks!
This commit is contained in:
Thog 2020-01-25 15:14:10 +01:00
commit bb616ce91c
2 changed files with 12 additions and 0 deletions

View file

@ -24,6 +24,11 @@ namespace ARMeilleure.Instructions
ExclusiveAddress = ulong.MaxValue;
}
public void Dispose()
{
Context.Dispose();
}
}
[ThreadStatic]
@ -36,6 +41,8 @@ namespace ARMeilleure.Instructions
public static void UnregisterThread()
{
_context.Dispose();
_context = null;
}

View file

@ -1131,5 +1131,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
{
throw new UndefinedInstructionException(e.Address, e.OpCode);
}
protected override void Destroy()
{
CpuMemory.Dispose();
}
}
}