From 7ce43270800bdf82fc60fbeab533240e7a04b9af Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 13 Nov 2019 13:25:59 +1100 Subject: [PATCH] No need to clean the arrays. We write over everything. --- src/ImageSharp/Formats/Png/Zlib/DeflaterEngine.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ImageSharp/Formats/Png/Zlib/DeflaterEngine.cs b/src/ImageSharp/Formats/Png/Zlib/DeflaterEngine.cs index 4db87c57e0..b146825015 100644 --- a/src/ImageSharp/Formats/Png/Zlib/DeflaterEngine.cs +++ b/src/ImageSharp/Formats/Png/Zlib/DeflaterEngine.cs @@ -155,17 +155,17 @@ namespace SixLabors.ImageSharp.Formats.Png.Zlib // Create pinned pointers to the various buffers to allow indexing // without bounds checks. - this.windowBuffer = memoryAllocator.AllocateManagedByteBuffer(2 * DeflaterConstants.WSIZE, AllocationOptions.Clean); + this.windowBuffer = memoryAllocator.AllocateManagedByteBuffer(2 * DeflaterConstants.WSIZE); this.window = this.windowBuffer.Array; this.windowBufferHandle = this.windowBuffer.Memory.Pin(); this.pinnedWindowPointer = (byte*)this.windowBufferHandle.Pointer; - this.headBuffer = memoryAllocator.Allocate(DeflaterConstants.HASH_SIZE, AllocationOptions.Clean); + this.headBuffer = memoryAllocator.Allocate(DeflaterConstants.HASH_SIZE); this.head = this.headBuffer.Memory; this.headBufferHandle = this.headBuffer.Memory.Pin(); this.pinnedHeadPointer = (short*)this.headBufferHandle.Pointer; - this.prevBuffer = memoryAllocator.Allocate(DeflaterConstants.WSIZE, AllocationOptions.Clean); + this.prevBuffer = memoryAllocator.Allocate(DeflaterConstants.WSIZE); this.prev = this.prevBuffer.Memory; this.prevBufferHandle = this.prevBuffer.Memory.Pin(); this.pinnedPrevPointer = (short*)this.prevBufferHandle.Pointer;