Utility Functions : List of Utility Functions : stm_list_destroy

stm_list_destroy
Deallocates the memory used by the specified list.
After the function operation, list cannot be used as an input argument in list functions.
The function does not free the entire memory space used by the list when the list members occupy more than a single memory location. For example, with strings only the pointers to the strings are destroyed. (Compare with stm_list_purge.)
Function Type
int
Syntax
stm_list_destroy (list, &status)
Arguments
Input/Output
Status Codes
Example
To use a list and then make its associated space available, use the following statements:

 

stm_list list;
int status;
.
.
if (stm_list_destroy (list, &status))
printf ("list destroyed");
.
.