Skip to content

das2c_free

C. Piker edited this page Dec 7, 2023 · 2 revisions

FUNCTION

das2c_free

PURPOSE

Delete resources associated with a single das2 query result from memory

CALLING SEQUENCE

num_left = das2c_free(result)

INPUTS

Parameter Type Purpose
result DAS2C_RESULT

Long

An integer result ID, or a DAS2C_RESULT structure as return by das2c_results or das2c_readhttp

OUTPUT

Returns the number of results still in memory.

SIDE EFFECTS

All structures that have been returned by das2c_datasets, das2c_pdims, and das2c_vars, no longer map to objects in the internal result database. Any copies in user code of the structures themselves are still valid, but since there IDs map to nothing, they are no longer useful for retrieving data.

Any arrays that have been returned by das2c_data are not deleted automatically if still held in an IDL user-space variable. These are cleaned up IDL itself.

EXAMPLES

Free a query result after it's no longer useful

n_elements(das2c_results())
das2c_free(1)
n_elements(das2c_results())

MODIFICATION HISTORY

C. Piker, 2020-03-12 - Initial Version

Clone this wiki locally