diff --git a/src/dotnetCampus.Ipc/Utils/IO/ByteListMessageStream.cs b/src/dotnetCampus.Ipc/Utils/IO/ByteListMessageStream.cs index d8e9c35d..1f0d750c 100644 --- a/src/dotnetCampus.Ipc/Utils/IO/ByteListMessageStream.cs +++ b/src/dotnetCampus.Ipc/Utils/IO/ByteListMessageStream.cs @@ -5,27 +5,19 @@ namespace dotnetCampus.Ipc.Utils.IO { + /// + /// 数组列表的消息,特别定义类型,方便内存分析 + /// internal class ByteListMessageStream : MemoryStream { - public ByteListMessageStream(byte[] buffer, int count, ISharedArrayPool sharedArrayPool) : base(buffer, 0, + public ByteListMessageStream(byte[] buffer, int count) : base(buffer, 0, count, false) { - _sharedArrayPool = sharedArrayPool; - Buffer = buffer; } public ByteListMessageStream(in IpcMessageContext ipcMessageContext) : this(ipcMessageContext.MessageBuffer, - (int) ipcMessageContext.MessageLength, ipcMessageContext.SharedArrayPool) + (int) ipcMessageContext.MessageLength) { } - - ~ByteListMessageStream() - { - _sharedArrayPool.Return(Buffer); - } - - private byte[] Buffer { get; } - - private readonly ISharedArrayPool _sharedArrayPool; } }