mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
18 lines
400 B
C#
18 lines
400 B
C#
namespace Brutal.RakNetApi
|
|
{
|
|
public unsafe partial struct RakPeerInstance(nint impl) : INullable, IDisposable
|
|
{
|
|
public bool IsNull() => impl is 0;
|
|
|
|
internal nint Impl => impl;
|
|
|
|
public void Dispose()
|
|
{
|
|
if (impl is not 0)
|
|
{
|
|
RakPeerInterface.DestroyInstance(this);
|
|
impl = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|