mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Mark NSAutoreleasePool.Init() as must-dispose
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user