# EssFree

Description

EssFree() frees a previously allocated block of memory, using the defined memory allocation scheme.

Syntax

    ESS_FUNC_M EssFree (hInstance, pBlock);

ESS_HINST_T | hInstance
ESS_PVOID_T | pBlock

Parameters

hInstance | Essbase API instance handle.
pBlock | Pointer to allocated memory block.

Return Value

None.

Notes

- This function frees memory using the user-supplied memory management function passed to the EssInit() function. If no such function is supplied, the default memory freeing function (dependent on the platform) will be used.
- This function should be used to free any memory allocated using the EssAlloc() and EssRealloc() functions. It should also be used to free any allocated buffers returned from Essbase API functions.

Access

This function requires no special privileges

Example

    ESS_FUNC_M
    ESS_GetAppActive (ESS_HCTX_T       hCtx,
                     ESS_HINST_T      hInst
                    )
    {
       ESS_FUNC_M     sts = ESS_STS_NOERR;
       ESS_STR_T     pDbName;
       ESS_STR_T     pAppName;
       ESS_ACCESS_T  Access;

       if ((sts = EssAlloc (hInst, 80, (ESS_PPVOID_T)&pAppName)) == 0)
       {
          if ((sts = EssAlloc (hInst, 80, (ESS_PPVOID_T)&pDbName)) == 0)
          {
             if ((sts = EssGetActive (hCtx, &pAppName, &pDbName, &Access)) == 0)
             {
                if (pAppName)
                {
                   if (*pAppName)
                      printf ("Current active application is [%s]\r\n",pAppName);
                   else
                      printf ("No active Application is set\r\n");
                   printf ("\r\n");
                }
             }
             EssFree (hInst, pDbName);
          }
          EssFree (hInst, pAppName);
       }
       return (sts);
    }

See Also

EssAlloc()
EssInit()
EssOtlGetMemberCommentEx()
EssOtlSetMemberCommentEx()
EssRealloc()