Skip to content

Commit 10cd3d5

Browse files
Update AnimationUtilities.cs
1 parent 5da17f3 commit 10cd3d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ImageSharp/Formats/AnimationUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static (bool Difference, Rectangle Bounds) DeDuplicatePixels<TPixel>(
4343
where TPixel : unmanaged, IPixel<TPixel>
4444
{
4545
MemoryAllocator memoryAllocator = configuration.MemoryAllocator;
46-
IMemoryOwner<Rgba32> buffers = memoryAllocator.Allocate<Rgba32>(currentFrame.Width * 4, AllocationOptions.Clean);
46+
using IMemoryOwner<Rgba32> buffers = memoryAllocator.Allocate<Rgba32>(currentFrame.Width * 4, AllocationOptions.Clean);
4747
Span<Rgba32> previous = buffers.GetSpan()[..currentFrame.Width];
4848
Span<Rgba32> current = buffers.GetSpan().Slice(currentFrame.Width, currentFrame.Width);
4949
Span<Rgba32> next = buffers.GetSpan().Slice(currentFrame.Width * 2, currentFrame.Width);

0 commit comments

Comments
 (0)