SdsFreeIdAndCheck - Free an identifier, so that its associated memory may be reused.

Function

Free an identifier, so that its associated memory may be reused.

Description

Each identifier allocated by SDS uses memory. To avoid excessive allocation of memory the SdsFreeId function can be used to free the memory associated with an identifer that is no longer needed. When this is done the memory will be reused by SDS for a subsequent identifier when needed.

This version of SdsFreeId() will check that any data items have been deleted (SdsDelete()) or free-ed (SdsReadFree()) if needed.

Language

C

Declaration

void SdsFreeIdAndCheck(char *mes, SdsIdType id, StatusType * SDSCONST status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>mescosnt char *If non-zero, then a message is written to stderr when a problem is detector (rather then just setting bad status). This string will be part of that message. The message indicates the SDS ID number and the exact reason the error was triggered.
>idSdsIdTypeIdentifier to be freed
!statusStatusType*Modified status. Possible failure codes are:

SDS__BADID The identifier is invalid.
SDS__CHK_FREE something has not been cleaned up.

Support

Tony Farrell, {AAO}

Version date

25-Sep-2008

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aaoepp.aao.gov.au