Skip to content

FixedSizeBuffer Methods

Manages a contiguous block of memory. Calls purge action with itself as the purge request when it's signaled to purge.

OnResetState

override
View source
public override void OnResetState()
Notifies the object that it has been purged, so it can reset itself to the state of a newly allocated object.

TryGetSegment(int, ArraySegment<byte>)

View source
public bool TryGetSegment(int size, out ArraySegment<byte> value)
Try to get a segment with a buffer of the specified size from this block. Fail if there is not enough space available

Parameters

sizeint
The size.
valueArraySegment<byte>
The segment.

Returns

true if the segment was retrieved; otherwise false.