AxisPool.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /************************************************/
  2. /* */
  3. /* Copyright (c) 2018 - 2021 monitor1394 */
  4. /* https://github.com/monitor1394 */
  5. /* */
  6. /************************************************/
  7. namespace XCharts
  8. {
  9. internal static class XAxisPool
  10. {
  11. private static readonly ObjectPool<XAxis> s_ListPool = new ObjectPool<XAxis>(null, null);
  12. public static XAxis Get()
  13. {
  14. return s_ListPool.Get();
  15. }
  16. public static void Release(XAxis toRelease)
  17. {
  18. s_ListPool.Release(toRelease);
  19. }
  20. }
  21. internal static class YAxisPool
  22. {
  23. private static readonly ObjectPool<YAxis> s_ListPool = new ObjectPool<YAxis>(null, null);
  24. public static YAxis Get()
  25. {
  26. return s_ListPool.Get();
  27. }
  28. public static void Release(YAxis toRelease)
  29. {
  30. s_ListPool.Release(toRelease);
  31. }
  32. }
  33. }