API reference
Constructor ContinuousMemoryBuffer
- Namespace
- DisCatSharp.Common.Types
- Assembly
- DisCatSharp.Common.dll
ContinuousMemoryBuffer(int, MemoryPool<byte>?, bool)
Creates a new buffer with a specified segment size, specified number of initially-allocated segments, and supplied memory pool.
public ContinuousMemoryBuffer(int initialSize = 65536, MemoryPool<byte>? memPool = null, bool clearOnDispose = false)
Parameters
initialSizeintInitial size of the buffer in bytes. Defaults to 64KiB.
memPoolMemoryPool<byte>Memory pool to use for renting buffers. Defaults to Shared.
clearOnDisposeboolDetermines whether the underlying buffers should be cleared on exit. If dealing with sensitive data, it might be a good idea to set this option to true.