fix: Updates ArrayPool to STArrayPool for performance. (#968)
This commit is contained in:
parent
76fddcbccd
commit
14b63ca48e
11 changed files with 3163 additions and 3165 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*************************************************************************
|
||||
* ModernUO *
|
||||
* Copyright (C) 2019-2020 - ModernUO Development Team *
|
||||
* Copyright 2019-2022 - ModernUO Development Team *
|
||||
* Email: hi@modernuo.com *
|
||||
* File: OutgoingGumpPackets.cs *
|
||||
* *
|
||||
|
|
@ -18,6 +18,7 @@ using System.Buffers;
|
|||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Server.Buffers;
|
||||
using Server.Collections;
|
||||
using Server.Gumps;
|
||||
using Server.Logging;
|
||||
|
|
@ -68,7 +69,7 @@ public static class OutgoingGumpPackets
|
|||
|
||||
if (wantLength > packBuffer.Length)
|
||||
{
|
||||
packBuffer = rentedBuffer = ArrayPool<byte>.Shared.Rent(wantLength);
|
||||
packBuffer = rentedBuffer = STArrayPool<byte>.Shared.Rent(wantLength);
|
||||
}
|
||||
|
||||
var packLength = wantLength;
|
||||
|
|
@ -90,7 +91,7 @@ public static class OutgoingGumpPackets
|
|||
|
||||
if (rentedBuffer != null)
|
||||
{
|
||||
ArrayPool<byte>.Shared.Return(rentedBuffer);
|
||||
STArrayPool<byte>.Shared.Return(rentedBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue