From: thefiddler Date: Tue, 22 Jul 2014 14:29:52 +0000 (+0200) Subject: [Mac] Do not use Autorelease pool X-Git-Tag: 2.0-0~105^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c4081f6ef7228c7386f06bd13de7accc9540add;p=platform%2Fcore%2Fcsapi%2Fopentk.git [Mac] Do not use Autorelease pool --- diff --git a/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs b/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs index cc2d98d..8357de3 100644 --- a/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs +++ b/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs @@ -209,14 +209,13 @@ namespace OpenTK.Platform.MacOS fixed (byte* pBytes = b) { - IntPtr nsData = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSData"), Selector.Alloc), - Selector.Get("initWithBytes:length:"), (IntPtr)pBytes, b.Length), - Selector.Autorelease); + IntPtr nsData = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSData"), Selector.Alloc), + Selector.Get("initWithBytes:length:"), (IntPtr)pBytes, b.Length); - IntPtr nsImage = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSImage"), Selector.Alloc), - Selector.Get("initWithData:"), nsData), - Selector.Autorelease); + IntPtr nsImage = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.Get("NSImage"), Selector.Alloc), + Selector.Get("initWithData:"), nsData); + Cocoa.SendVoid(nsData, Selector.Release); return nsImage; } }