TiPlotChannelCustom.Capacity

TiPlotChannelCustom

Retrieves the currently allocated number of data points in the channel.

property Capacity : Integer;

Description

Use Capacity to retrieve the the currently allocated number of data points in the channel. The Capacity refers to the number of data points "slots" that have been allocated in memory for this channel.

As you are adding data points to the channel, whenever this Capacity is reached, additional data point "slots" in memory are allocated to enhance memory utilization performance. The amount of additional data point "slots" that are allocated is equal to 25% additional data points.

For example, if the Capacity is 1,000,000 data points and you have just added your 1 millionth data point, the capacity will jump to 1,250,000 data points. When you exceed 1,250,000 data points, the capacity will jump by another 25%. What this does is allocate memory for the channel in the operating system in "chunks" instead of allocating more memory after each data point addition, saving processor time and operating system memory management overhead.

Note: This property is generally not needed by the typical application, and is for informational purposes only. Memory allocation in the channel is automatic, and this property represents the current, automatically allocated amount of memory in use by the channel.

===================================================

Actual Data Point Count
: if you simply want to know the number of actual data points added to the chart, use the Count property.

Currently Allocated Memory in Use: if you want to know the amount of bytes of memory allocated by the channel, use the MemoryUsed property instead.

Manual Memory Allocation: If you are adding a large number of data points to the chart, you can manually allocate memory by simply setting the Count property of the channel to the number of data points you wish to add so that the memory can be allocated all at once to save operating system overhead.

===================================================

Example

Delphi

Value := iComponent.Channel[0].Capacity;

C++ Builder

Value = iComponent->Channel[0]->Capacity;

Note: This property is Read-Only

Contents | Index | Previous | Next