brutal/Brutal.Sdl.Ttf/Generated/SdlTtf.Handles.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

26 lines
786 B
C#

// <auto-generated/>
// Generated by Brutal.Sdl.Generate; do not edit by hand.
#nullable enable
using System;
using Brutal.Interop;
namespace Brutal.SdlApi.Ttf;
/// <summary>
/// A strongly-typed interop handle wrapping the opaque SDL <c>TTF_Font</c> pointer.
/// </summary>
[InteropHandle]
public readonly unsafe partial struct TtfFont : IDisposable
{
/// <inheritdoc/>
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlTtf.PInvoke.CloseFont(this);
}
}