// // Generated by Brutal.Sdl.Generate; do not edit by hand. #nullable enable using System; using Brutal.Interop; namespace Brutal.SdlApi.Image; /// /// A strongly-typed interop handle wrapping the opaque SDL IMG_AnimationDecoder pointer. /// [InteropHandle] public readonly unsafe partial struct ImgAnimationDecoder : IDisposable { /// 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; SdlImage.PInvoke.CloseAnimationDecoder(this); } } /// /// A strongly-typed interop handle wrapping the opaque SDL IMG_AnimationEncoder pointer. /// [InteropHandle] public readonly unsafe partial struct ImgAnimationEncoder : IDisposable { /// 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; SdlImage.PInvoke.CloseAnimationEncoder(this); } }