Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Frees virtual memory allocated by an EDMinterface function. All EDMinterface functions that read a data value of the primitive types : sdaiSTRING, sdaiENUMERATION, and sdaiBINARY will allocate virtual memory to hold the actual data value. It is the responsibility of the calling application to free this memory when appropriate by invoking the edmiFree function to avoid "out of virtual memory error".
Likewise the EDMinterface function that returns a typed value will allocate virtual memory to hold the type information, i.e. the typeList element in the tSdaiSelect structure, hence it is the responsibility of the calling application to free this virtual memory by invoking the edmiFree function when appropriate.
Header:
#include "sdai.h"
Prototype:
void edmiFree(void *address);
Arguments:

address

Specifies the address of the virtual memory to be freed.

Returns:
void.
EXAMPLE:
SdaiInstance manId;
SdaiString givenName,familyName;
SdaiErrorCode rstat;
...
sdaiGetAttrsBN(manId, 2, "FamilyName", sdaiSTRING, &familyName,
"GiveName", sdaiSTRING, &givenName); 
if (rstat = sdaiErrorQuery()) {
/* Error in operation */ 
printf("\nError: %s in sdaiGetAttrsBN\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
printf("\nFamilyName: %s GivenName: %s",familyName,givenName);
edmiFree(familyName);
edmiFree(givenName);
...

  • No labels