Skip to content

Commit 018fb73

Browse files
committed
Mark NSAutoreleasePool.Init() as must-dispose
1 parent 7249d66 commit 018fb73

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

osu.Framework/Platform/Apple/Native/NSAutoreleasePool.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// See the LICENCE file in the repository root for full licence text.
33

44
using System;
5+
using JetBrains.Annotations;
56

67
namespace osu.Framework.Platform.Apple.Native
78
{
@@ -19,6 +20,7 @@ internal NSAutoreleasePool(IntPtr handle)
1920
private static readonly IntPtr sel_init = Selector.Get("init");
2021
private static readonly IntPtr sel_drain = Selector.Get("drain");
2122

23+
[MustDisposeResource]
2224
public static NSAutoreleasePool Init()
2325
=> new NSAutoreleasePool(Interop.SendIntPtr(Interop.SendIntPtr(class_pointer, sel_alloc), sel_init));
2426

0 commit comments

Comments
 (0)