mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-18 09:24:39 +01:00
23 lines
426 B
C#
23 lines
426 B
C#
using System.Collections.Generic;
|
|
|
|
namespace UnityEngine.UI
|
|
{
|
|
internal static class ListPool<T>
|
|
{
|
|
private static readonly UnityEngine.UI.ObjectPool<List<T>> s_ListPool = new UnityEngine.UI.ObjectPool<List<T>>(null, delegate(List<T> l)
|
|
{
|
|
l.Clear();
|
|
});
|
|
|
|
public static List<T> Get()
|
|
{
|
|
return s_ListPool.Get();
|
|
}
|
|
|
|
public static void Release(List<T> toRelease)
|
|
{
|
|
s_ListPool.Release(toRelease);
|
|
}
|
|
}
|
|
}
|