Browse Source

fixes

pull/1730/head
Anton Firszov 5 years ago
parent
commit
27ede235a3
  1. 2
      src/ImageSharp/Memory/Allocators/UniformUnmanagedMemoryPoolMemoryAllocator.cs
  2. 2
      src/ImageSharp/Memory/DiscontiguousBuffers/MemoryGroup{T}.cs
  3. 4
      tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs

2
src/ImageSharp/Memory/Allocators/UniformUnmanagedMemoryPoolMemoryAllocator.cs

@ -106,6 +106,8 @@ namespace SixLabors.ImageSharp.Memory
{ {
buffer.Clear(); buffer.Clear();
} }
return buffer;
} }
} }

2
src/ImageSharp/Memory/DiscontiguousBuffers/MemoryGroup{T}.cs

@ -200,7 +200,7 @@ namespace SixLabors.ImageSharp.Memory
return null; return null;
} }
return new Owned(pool, arrays, bufferLength, totalLengthInElements, sizeOfLastBuffer); return new Owned(pool, arrays, bufferLength, totalLengthInElements, sizeOfLastBuffer, options);
} }
public static MemoryGroup<T> Wrap(params Memory<T>[] source) public static MemoryGroup<T> Wrap(params Memory<T>[] source)

4
tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs

@ -329,8 +329,8 @@ namespace SixLabors.ImageSharp.Tests.Memory.Allocators
[InlineData(1200)] [InlineData(1200)]
public void MemoryOwnerFinalizer_ReturnsToPool(int length) public void MemoryOwnerFinalizer_ReturnsToPool(int length)
{ {
RunTest(length.ToString()); // RunTest(length.ToString());
// RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose(); RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose();
static void RunTest(string lengthStr) static void RunTest(string lengthStr)
{ {

Loading…
Cancel
Save