From ea52b328592db39f31587a6eeaa81ee2dd36df3e Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Fri, 24 Mar 2023 19:03:46 +0100 Subject: [PATCH] Fixed memory leak in RecyclableList.AddRangeEnumerated --- Recyclable.Collections/RecyclableList.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index 08cd2ef..787eb03 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -91,7 +91,7 @@ namespace Recyclable.Collections int blockSize = _blockSize, targetItemIdx = _nextItemIndex, targetBlockIdx = _lastBlockIndex; - IEnumerator enumerator = source.GetEnumerator(); + using IEnumerator enumerator = source.GetEnumerator(); if (!enumerator.MoveNext()) { return;