mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[csharp] Fix ExposedList.Resize
This commit is contained in:
parent
bcf90240db
commit
292f1a26e3
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user