SmartMemoryManagement

SmartMemoryStream.EnsureSize Method

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

[Visual Basic]
Overridable Protected Sub EnsureSize( _ 
   ByVal size As Long _ 
)
[C#]
protected virtual void EnsureSize(
   long size
);
[C++]
protected: virtual void EnsureSize(
   __int64 size
);
[JScript]
protected virtual function EnsureSize(
   long size
);

Parameters

size
The minimum capacity of the buffer.

Remarks

If the capacity of the buffer is to small, the capacity will be increased. As long as the requested size is below 2 megabytes, this method will ensure that the buffer has twice the requested size. Above this limit, a factor of 1.5 is used.

See Also

SmartMemoryStream Class | InfiniTec.SystemUtilities Namespace