diff options
Diffstat (limited to 'Ryujinx.Core/OsHle/Handles/HSessionObj.cs')
| -rw-r--r-- | Ryujinx.Core/OsHle/Handles/HSessionObj.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Handles/HSessionObj.cs b/Ryujinx.Core/OsHle/Handles/HSessionObj.cs new file mode 100644 index 00000000..ed0530f7 --- /dev/null +++ b/Ryujinx.Core/OsHle/Handles/HSessionObj.cs @@ -0,0 +1,30 @@ +using System; + +namespace Ryujinx.Core.OsHle.Handles +{ + class HSessionObj : HSession, IDisposable + { + public object Obj { get; private set; } + + public HSessionObj(HSession Session, object Obj) : base(Session) + { + this.Obj = Obj; + } + + public void Dispose() + { + Dispose(true); + } + + protected virtual void Dispose(bool Disposing) + { + if (Disposing && Obj != null) + { + if (Obj is IDisposable DisposableObj) + { + DisposableObj.Dispose(); + } + } + } + } +}
\ No newline at end of file |
