5.2.54hdfql_variable_unregister_all
Syntax
void hdfql_variable_unregister_all(void)
Description
Unregister all the variables that may have been registered previously. In other words, HDFql will free up any memory that may have been allocated to manage the variables, as well as the numbers assigned to them (the numbers may then be assigned to new variables registered subsequently). In general, it is advisable to unregister variables as soon as they are no longer used by HDFql (this is especially relevant in C#, as variables are unpinned when unregistered and thus may again be moved by the Garbage Collector).
Parameter(s)
None
Return
Nothing
Example(s)
// declare variables
short data0[3];
float data1[5];
// register variable "data0" for subsequent use (by HDFql)
hdfql_variable_register(data0);
// register variable "data1" for subsequent use (by HDFql)
hdfql_variable_register(data1);
// display number of variable "data0" (should be "Number of variable is 0")
printf("Number of variable is %d\n", hdfql_variable_get_number(data0));
// display number of variable "data1" (should be "Number of variable is 1")
printf("Number of variable is %d\n", hdfql_variable_get_number(data1));
// unregister all the variables (i.e. variables "data0" and "data1") as they are no longer used/needed (by HDFql)
hdfql_variable_unregister_all();