Programmer's Guide
RaDeKL Radar API Programmer’s Guide 10
© Multispectral Solutions, Inc. 2006
RaDeKL_ListRadarsCleanup
De-allocates the memory that was allocated in a previous call to RaDeKL_ListRadars. Normally, this is not
required as each successive call to RaDeKL_ListRadars de-allocates these lists and Windows will do the
final de-allocation when the program terminates. However, if the design calls for an explicit de-allocation,
this function can be used.
Format:
void RaDeKL_ListRadarsCleanup (char **list);
Parameters:
list Pointer to a (null-terminated) list of character strings to de-allocate.
Return Value:
No return value. This function cannot fail.
Example:
List all available radar units and display the information obtained.
ULONG status, i;
DWORD numdevs;
static char **snum = NULL, **desc = NULL; // or make these global
status = RaDeKL_ListRadars (&numdevs, &snum, &desc);
if (status != RaDeKL_OK)
{
printf (“Unable to list devices: %s\n”, RaDeKL_GetStatusText (status));
return;
}
printf (“Number of devices detected: %d\n”, numdevs);
for (i = 0; i < numdevs; i++)
printf (“Device %d, Serial: %s, Description: %s\n”, i, snum[i], desc[i]);
// De-allocate the lists
RaDeKL_ListRadarsCleanup (snum); snum = NULL;
RaDeKL_ListRadarsCleanup (desc); snum = NULL;