From 8f602a4f297caa0f4b9e25c5d814a1ed22b1fbee Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Mon, 9 May 2016 11:50:47 -0700 Subject: [PATCH] Fix desktop build break. [tfs-changeset: 1603043] --- .../System/Runtime/InteropServices/NativeBuffer.cs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/NativeBuffer.cs b/src/mscorlib/src/System/Runtime/InteropServices/NativeBuffer.cs index ebe5b7b..9426162 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/NativeBuffer.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/NativeBuffer.cs @@ -9,10 +9,6 @@ namespace System.Runtime.InteropServices /// /// Wrapper for access to the native heap. Dispose to free the memory. Try to use with using statements. /// Does not allocate zero size buffers, and will free the existing native buffer if capacity is dropped to zero. - /// -#if !FEATURE_CORECLR - /// NativeBuffer utilizes a cache of heap buffers. -#endif /// /// /// Suggested use through P/Invoke: define DllImport arguments that take a byte buffer as SafeHandle. @@ -25,11 +21,6 @@ namespace System.Runtime.InteropServices /// internal class NativeBuffer : IDisposable { -#if !FEATURE_CORECLR - // The need for caching the heap handles isn't as great in CoreCLR as most current usages of this class' - // consumers are wrapped by CoreFx. (As opposed to NetFX 4.6 where there is no wrapping) - private readonly static SafeHeapHandleCache s_handleCache; -#endif [System.Security.SecurityCritical] private readonly static SafeHandle s_emptyHandle; [System.Security.SecurityCritical] @@ -40,9 +31,6 @@ namespace System.Runtime.InteropServices static NativeBuffer() { s_emptyHandle = new EmptySafeHandle(); -#if !FEATURE_CORECLR - s_handleCache = new SafeHeapHandleCache(); -#endif } /// @@ -132,11 +120,7 @@ namespace System.Runtime.InteropServices if (_handle == null) { -#if FEATURE_CORECLR _handle = new SafeHeapHandle(byteLength); -#else - _handle = s_handleCache.Acquire(byteLength); -#endif } else { @@ -149,9 +133,6 @@ namespace System.Runtime.InteropServices { if (_handle != null) { -#if !FEATURE_CORECLR - s_handleCache.Release(_handle); -#endif _capacity = 0; _handle = null; } -- 2.7.4