The ts_free_elem() procedure

The ts_free_elem() procedure frees a time series element, releasing its resources. It is used to free elements created by ts_make_elem() or ts_row_to_elem(). It must not be called to free elements returned by ts_elem(), ts_first_elem(), ts_last_elem(), ts_last_valid(), ts_next(), ts_next_valid(), ts_nth_elem(), or ts_previous_valid(); those elements are overwritten with subsequent calls or freed when the corresponding scan or time series descriptor is closed.

Syntax

void 
ts_free_elem(ts_tsdesc *tsdesc, 
              ts_tselem elem)
tsdesc
The descriptor for a time series returned by ts_open().
elem
A time series element. It must agree in type with the time series described by tsdesc.