Skip to content

Commit 22e1c06

Browse files
committed
Use MemoryAllocator from configuration
1 parent 9c5a393 commit 22e1c06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ImageSharp/Image.Decode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private static async ValueTask<IImageFormat> InternalDetectFormatAsync(
9999
ImageFormatManager.ThrowInvalidDecoder(configuration.ImageFormatsManager);
100100
}
101101

102-
using (IMemoryOwner<byte> memoryOwner = MemoryPool<byte>.Shared.Rent(headerSize))
102+
using (IMemoryOwner<byte> memoryOwner = configuration.MemoryAllocator.Allocate<byte>(headerSize))
103103
{
104104
Memory<byte> headersBuffer = memoryOwner.Memory;
105105
long startPosition = stream.Position;

0 commit comments

Comments
 (0)