This commit is contained in:
vis2k 2021-02-18 14:39:59 +08:00
parent efac1e2f5f
commit 409eac092d
2 changed files with 2 additions and 9 deletions

View File

@ -9,11 +9,7 @@ public sealed class PooledNetworkReader : NetworkReader, IDisposable
{ {
internal PooledNetworkReader(byte[] bytes) : base(bytes) {} internal PooledNetworkReader(byte[] bytes) : base(bytes) {}
internal PooledNetworkReader(ArraySegment<byte> segment) : base(segment) {} internal PooledNetworkReader(ArraySegment<byte> segment) : base(segment) {}
public void Dispose() => NetworkReaderPool.Recycle(this);
public void Dispose()
{
NetworkReaderPool.Recycle(this);
}
} }
/// <summary> /// <summary>

View File

@ -7,10 +7,7 @@ namespace Mirror
/// </summary> /// </summary>
public sealed class PooledNetworkWriter : NetworkWriter, IDisposable public sealed class PooledNetworkWriter : NetworkWriter, IDisposable
{ {
public void Dispose() public void Dispose() => NetworkWriterPool.Recycle(this);
{
NetworkWriterPool.Recycle(this);
}
} }
/// <summary> /// <summary>