Browse Source

Fix pooled list bug.

Ported from upstream: https://github.com/jtmueller/Collections.Pooled/pull/44
Steven Kirk 3 years ago
parent
commit
25efb6bec6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Avalonia.Base/Collections/Pooled/PooledList.cs

+ 1 - 1
src/Avalonia.Base/Collections/Pooled/PooledList.cs

@@ -587,7 +587,7 @@ namespace Avalonia.Collections.Pooled
             if (size > 0 && _clearOnFree)
             {
                 // Clear the elements so that the gc can reclaim the references.
-                Array.Clear(_items, 0, _size);
+                Array.Clear(_items, 0, size);
             }
         }