Files
Ultimate-Fishing-Simulator-…/Assets/Plugins/Assembly-CSharp-firstpass/DebuggingEssentials/FastCacheList.cs
2026-03-04 09:37:33 +08:00

26 lines
376 B
C#

using System;
namespace DebuggingEssentials
{
[Serializable]
public class FastCacheList<T> : FastList<T> where T : new()
{
public FastCacheList(int capacity)
: base(capacity)
{
}
public T GetItem()
{
if (_count == 0)
{
return new T();
}
T result = items[--_count];
items[_count] = default(T);
Count = _count;
return result;
}
}
}