Merge pull request #12 from yossiepon/fix/issue_11
[FIX] Cysharp/ObservableCollections#11
This commit is contained in:
commit
6d6aa74ff8
@ -49,7 +49,7 @@ namespace ObservableCollections.Internal
|
||||
}
|
||||
else
|
||||
{
|
||||
var array = ArrayPool<T>.Shared.Rent(count);
|
||||
var array = ArrayPool<T>.Shared.Rent(16);
|
||||
|
||||
var i = 0;
|
||||
foreach (var item in source)
|
||||
@ -75,9 +75,9 @@ namespace ObservableCollections.Internal
|
||||
if (array.Length == index)
|
||||
{
|
||||
ArrayPool<T>.Shared.Return(array, RuntimeHelpersEx.IsReferenceOrContainsReferences<T>());
|
||||
}
|
||||
array = ArrayPool<T>.Shared.Rent(index * 2);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user