Freeing allocated memory
All FreeAR functions accept these input arguments:
- value - Pointer to the structure to free.
The function recursively frees all allocated memory in the structure. If you set this to NULL (or the structure is a list with zero items), the function performs no operations. - freeStruct - Boolean value that specifies whether to free the top-level structure.
If you allocated memory for the top-level structure, specify TRUE to free both the structure and its contents.
If you used a stack variable for the top-level structure, specify FALSE to free only the contents of the structure.
The following example illustrates the difference:
When an API function fails (that is, status is greater than one), the system initializes all output parameters except ARStatusList. As a result, the only FreeAR function the program must call is FreeARStatusList.
Calling FreeAR data Structure for the other parameters is unnecessary but harmless.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*