mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-01 23:42:26 -07:00
Fix a crash when closing the main UI (#904)
* Fix a crash when closing the main Ui Also make sure to dispose the OpenAL context to not leak memory when unloading the emulation context. * Improve keys and 'game already running' dialogs * Make sure to dispose the page table and ThreadContext Less memory leaks! * Fix tests * Address gdk's comments
This commit is contained in:
@@ -107,6 +107,7 @@ namespace Ryujinx.HLE.HOS
|
||||
public Keyset KeySet => Device.FileSystem.KeySet;
|
||||
|
||||
private bool _hasStarted;
|
||||
private bool _isDisposed;
|
||||
|
||||
public BlitStruct<ApplicationControlProperty> ControlData { get; set; }
|
||||
|
||||
@@ -740,8 +741,10 @@ namespace Ryujinx.HLE.HOS
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
if (!_isDisposed && disposing)
|
||||
{
|
||||
_isDisposed = true;
|
||||
|
||||
KProcess terminationProcess = new KProcess(this);
|
||||
|
||||
KThread terminationThread = new KThread(this);
|
||||
|
Reference in New Issue
Block a user