Ryujinx/Ryujinx.Core/OsHle/Handles/HSessionObj.cs

30 lines
642 B
C#
Raw Normal View History

using System;
namespace Ryujinx.Core.OsHle.Handles
2018-02-05 00:08:20 +01:00
{
class HSessionObj : HSession, IDisposable
2018-02-05 00:08:20 +01:00
{
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();
}
}
}
2018-02-05 00:08:20 +01:00
}
}