3.27 DM_FreeVectorValue
By using this function the memory allocated on calling DM_GetVectorValue can be released again.
void DML_default DM_EXPORT DM_FreeVectorValue
(
DM_VectorValue *values,
DM_Options options
)
Parameters
In this parameter the vector contained in Dialog Manager is transferred.
-> DM_Options options
Currently not used. Please specify with 0.
Example
Querying the tablefield contents and releasing attribute vector.
DM_Boolean DML_default DM_ENTRY ReplaceName__3(
(DM_ID, table),
(char *, from),
(char *, to))
{
DM_VectorValue *oldData;
DM_Value count;
DM_Value lastidx;
DM_boolean retval = true;
if (!DM_GetValue(table, AT_rowcount, 0, &count, 0)
|| (count.type != DT_integer))
return FALSE;
lastidx.type = DT_index;
lastidx.value.index.first = count.value.integer;
lastidx.value.index.second = 2;
if DM_GetVectorValue(table, AT_content, (DM_Value *) 0,
&lastidx, &oldData, 0))
return FALSE;
DM_FreeVectorValue(oldData, 0);
return retval;
}