Make sure to dispose the page table and ThreadContext
Less memory leaks!
This commit is contained in:
parent
78d43694c3
commit
bb616ce91c
2 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1131,5 +1131,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
{
|
||||
throw new UndefinedInstructionException(e.Address, e.OpCode);
|
||||
}
|
||||
|
||||
protected override void Destroy()
|
||||
{
|
||||
CpuMemory.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue