mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-19 17:19:56 +00:00
20 lines
425 B
C#
20 lines
425 B
C#
using Daybreak.API.Interop.GuildWars;
|
|
|
|
namespace Daybreak.API.Interop;
|
|
|
|
public readonly struct ManagedFrame(
|
|
WrappedPointer<Frame> frame,
|
|
Action closeFrame) : IDisposable
|
|
{
|
|
private readonly Action closeFrame = closeFrame;
|
|
|
|
public static ManagedFrame Null => new(null, () => { });
|
|
|
|
public readonly WrappedPointer<Frame> Frame = frame;
|
|
|
|
public void Dispose()
|
|
{
|
|
this.closeFrame();
|
|
}
|
|
}
|