SmartMemoryManagement

SmartMemoryStream.SetCapacity Method

Sets the capacity of the stream to the requested size.

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

Parameters

size
The requested size

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