You are here: Symbol Reference > MtxVecBase Namespace > Classes > TMtxVecBase Class > published > TMtxVecBase.Length Property
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVecBase.Length Property

Defines the length in number of samples.

Pascal
property Length: integer;

Defines the number of samples that the object can store. The length property does not map directly to memory reallocation when it is changed. Until the amount of preallocated memory is not exceed, there is no reallocation going on. 

Changing the Length property will preserve the existing values, but only if the new property value is smaller than the amount of preallocated memory. To properly resize the memory allocated use the TVec.Resize method. 

It is recommended that vector sizes do not exceed the size of preallocated memory to increase overall performance. The size of preallocated memory can be controlled with the Controller global variable and with the Capacity property.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!