From 14780a70c40c16115a51f7b3e59dfedd02d81ba6 Mon Sep 17 00:00:00 2001 From: Jason Nelson Date: Fri, 24 Aug 2018 11:32:58 -0700 Subject: [PATCH] [SL.Core] Seal ManagedByteBuffer --- .../Memory/ArrayPoolMemoryAllocator.Buffer{T}.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.Buffer{T}.cs b/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.Buffer{T}.cs index 31096d3a93..0b0d6c4d49 100644 --- a/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.Buffer{T}.cs +++ b/src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.Buffer{T}.cs @@ -51,7 +51,7 @@ namespace SixLabors.Memory /// protected override void Dispose(bool disposing) { - if (!disposing || this.Data == null || this.sourcePoolReference == null) + if (!disposing || this.Data is null || this.sourcePoolReference is null) { return; } @@ -71,7 +71,7 @@ namespace SixLabors.Memory /// /// The implementation of . /// - private class ManagedByteBuffer : Buffer, IManagedByteBuffer + private sealed class ManagedByteBuffer : Buffer, IManagedByteBuffer { public ManagedByteBuffer(byte[] data, int length, ArrayPool sourcePool) : base(data, length, sourcePool)