aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThog <me@thog.eu>2019-12-26 02:58:38 +0100
committerAc_K <Acoustik666@gmail.com>2019-12-26 02:58:38 +0100
commit1db3a66da376c073371a78042e4baecf467ed108 (patch)
tree90f83474a2731ed1333ecf585b575a828ec1c34c
parent55c956e2ec83b2b7f414688c4fe4ed9f1f316935 (diff)
Fix LibHac.IStorage not being disposed in FileSystem proxy (#851)
-rw-r--r--Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
index cc407039..b2db08dd 100644
--- a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
+++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs
@@ -1,9 +1,10 @@
using LibHac;
using Ryujinx.HLE.HOS.Ipc;
+using System;
namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
{
- class IStorage : IpcService
+ class IStorage : IpcService, IDisposable
{
private LibHac.Fs.IStorage _baseStorage;
@@ -51,5 +52,18 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
return (ResultCode)result.Value;
}
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ _baseStorage?.Dispose();
+ }
+ }
}
} \ No newline at end of file