mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-10 22:06:40 +00:00
Fix LibHac.IStorage not being disposed in FileSystem proxy (#851)
This commit is contained in:
parent
55c956e2ec
commit
1db3a66da3
1 changed files with 15 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
||||||
using LibHac;
|
using LibHac;
|
||||||
using Ryujinx.HLE.HOS.Ipc;
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
|
namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
|
||||||
{
|
{
|
||||||
class IStorage : IpcService
|
class IStorage : IpcService, IDisposable
|
||||||
{
|
{
|
||||||
private LibHac.Fs.IStorage _baseStorage;
|
private LibHac.Fs.IStorage _baseStorage;
|
||||||
|
|
||||||
|
@ -51,5 +52,18 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
|
||||||
|
|
||||||
return (ResultCode)result.Value;
|
return (ResultCode)result.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
_baseStorage?.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue