mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-27 17:40:50 +01:00
30 lines
637 B
C#
30 lines
637 B
C#
using System;
|
|
|
|
namespace Ryujinx.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();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |