Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

25 řádky
540 B

  1. using System.Buffers;
  2. namespace JT1078.Protocol
  3. {
  4. internal static class JT1078ArrayPool
  5. {
  6. private readonly static ArrayPool<byte> ArrayPool;
  7. static JT1078ArrayPool()
  8. {
  9. ArrayPool = ArrayPool<byte>.Create();
  10. }
  11. public static byte[] Rent(int minimumLength)
  12. {
  13. return ArrayPool.Rent(minimumLength);
  14. }
  15. public static void Return(byte[] array, bool clearArray = false)
  16. {
  17. ArrayPool.Return(array, clearArray);
  18. }
  19. }
  20. }