An NDoc Documented Class Library

SmartMemoryStream.EnsureSize Method 

The method ensures the the underlying _Buffer has at least the size specified by the size parameter.

protected virtual void EnsureSize(
   long size
);

Parameters

size
The minimum capacity of the buffer.

Remarks

If the required size exceeds the current capacity of the buffer, a new buffer is aquired from the BufferProvider. The content of the current buffer is copied to the new buffer.

If the size of the old buffer exceeds the MinimumRequiredSize, it will be recycled by the BufferManager.

See Also

SmartMemoryStream Class | InfiniTec.SystemUtilities Namespace