Table of Contents
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

initialSize int

Initial size of the buffer in bytes. Defaults to 64KiB.

memPool MemoryPool<byte>

Memory pool to use for renting buffers. Defaults to Shared.

clearOnDispose bool

Determines 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.