暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

TMP_ListPool.cs 495B

123456789101112131415161718192021
  1. using System.Collections.Generic;
  2. namespace TMPro
  3. {
  4. internal static class TMP_ListPool<T>
  5. {
  6. // Object pool to avoid allocations.
  7. private static readonly TMP_ObjectPool<List<T>> s_ListPool = new TMP_ObjectPool<List<T>>(null, l => l.Clear());
  8. public static List<T> Get()
  9. {
  10. return s_ListPool.Get();
  11. }
  12. public static void Release(List<T> toRelease)
  13. {
  14. s_ListPool.Release(toRelease);
  15. }
  16. }
  17. }