IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXTrim

Function

Frees space allocated in an Array beyond that required for the number of items in the Array.

Syntax

#include <dx/dx.h>

Array DXTrim(Array a)

Functional Details

Under some circumstances, more space than is necessary to hold the items added to a may have been allocated. This can happen if you have called DXAllocateArray. It can also happen when you call DXAddArrayData. This extra space can be freed by calling DXTrim. The DXEndField routine automatically calls DXTrim on all components of a Field.

Return Value

Returns a or returns NULL and sets an error code.

DXTrimItems

Function

Frees space allocated in an Array beyond that required for the number of items in the Array.

Syntax

#include <dx/dx.h>

Array DXTrimItems(Array a, int nitems)

Functional Details

It may desirable to remove elements at the end of an array to shrink the array without having to copy it. DXTrimItems will make the array nitems long removing items from the end of the array and automatically calling DXTrim to free the extra array memory.

Return Value

Returns a or returns NULL and sets an error code.

See Also

DXAddArrayData, DXAllocateArray, DXEndField, "Irregular Arrays".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page]


[IBM Home Page | Order | Search | Contact IBM | Legal ]