mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 15:46:57 +00:00
[Mac] Do not use Autorelease pool
This commit is contained in:
parent
5501689d37
commit
0c4081f6ef
|
@ -209,14 +209,13 @@ namespace OpenTK.Platform.MacOS
|
||||||
|
|
||||||
fixed (byte* pBytes = b)
|
fixed (byte* pBytes = b)
|
||||||
{
|
{
|
||||||
IntPtr nsData = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSData"), Selector.Alloc),
|
IntPtr nsData = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSData"), Selector.Alloc),
|
||||||
Selector.Get("initWithBytes:length:"), (IntPtr)pBytes, b.Length),
|
Selector.Get("initWithBytes:length:"), (IntPtr)pBytes, b.Length);
|
||||||
Selector.Autorelease);
|
|
||||||
|
|
||||||
IntPtr nsImage = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSImage"), Selector.Alloc),
|
IntPtr nsImage = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSImage"), Selector.Alloc),
|
||||||
Selector.Get("initWithData:"), nsData),
|
Selector.Get("initWithData:"), nsData);
|
||||||
Selector.Autorelease);
|
|
||||||
|
|
||||||
|
Cocoa.SendVoid(nsData, Selector.Release);
|
||||||
return nsImage;
|
return nsImage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue