From 018fb73034b1cc0678ecab91e6f33a206536ad35 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Tue, 18 Feb 2025 18:06:31 +0900 Subject: [PATCH] Mark `NSAutoreleasePool.Init()` as must-dispose --- osu.Framework/Platform/Apple/Native/NSAutoreleasePool.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Framework/Platform/Apple/Native/NSAutoreleasePool.cs b/osu.Framework/Platform/Apple/Native/NSAutoreleasePool.cs index f4f58cce8..2e99c329d 100644 --- a/osu.Framework/Platform/Apple/Native/NSAutoreleasePool.cs +++ b/osu.Framework/Platform/Apple/Native/NSAutoreleasePool.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using JetBrains.Annotations; namespace osu.Framework.Platform.Apple.Native { @@ -19,6 +20,7 @@ namespace osu.Framework.Platform.Apple.Native private static readonly IntPtr sel_init = Selector.Get("init"); private static readonly IntPtr sel_drain = Selector.Get("drain"); + [MustDisposeResource] public static NSAutoreleasePool Init() => new NSAutoreleasePool(Interop.SendIntPtr(Interop.SendIntPtr(class_pointer, sel_alloc), sel_init));