[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Sets the new capacity for the memory stream
Source position: classesh.inc line 889
protected function TMemoryStream.Realloc( |
var NewCapacity: LongInt |
):Pointer; virtual; |
SetCapacity sets the capacity of the memory stream, i.e. does the actual allocation or de-allocation of memory for the stream. It allocates at least NewCapacity bytes on the heap, moves the current contents of the stream to this location (as much as fits in) and returns the new memory location. Extra allocated memory is not initialized, i.e. may contain garbage.
Memory is allocated in blocks of 4 Kb; this can be changed by overriding the method.
|
Current capacity of the stream. |
lazarus-ccr.sourceforge.net |