[csharp] Fix ExposedList.Resize

This commit is contained in:
John 2017-10-19 19:27:51 +08:00 committed by GitHub
parent bcf90240db
commit 292f1a26e3

View File

@ -1,4 +1,4 @@
//
//
// System.Collections.Generic.List
//
// Authors:
@ -97,9 +97,9 @@ namespace Spine {
// var newItems = new T[newSize];
// Array.Copy(oldItems, newItems, Count);
// Items = newItems;
} else if (newSize > itemsLength) {
} else if (newSize < itemsLength) {
// Allow nulling of T reference type to allow GC.
for (int i = Count; i < itemsLength; i++)
for (int i = newSize; i < itemsLength; i++)
oldItems[i] = default(T);
}
Count = newSize;