Programming Guides › Programming Guide for C › Policy Management API › Policy Management API Overview › Memory, Cache, and Agent Key Management
Memory, Cache, and Agent Key Management
The following functions free memory allocated by the Policy Management API:
- Sm_PolicyApi_FreeMemory() and Sm_PolicyApi_FreeMemoryEx() free any of the linked list pointers that are returned by the API.
- Sm_AgentApi_FreeServers() frees an array of server structures allocated by Sm_AgentApi_GetConfig(). Sm_PolicyApi_FreeStringArray() frees arrays of returned strings.
Another management command, Sm_PolicyApi_ManagementCommand(), performs cache and agent encryption key management, such as:
- Flushing all caches
- Flushing users cache
- Flushing realms from the resource cache
- Changing dynamic keys
- Changing persistent keys
The type of management operation you want to perform is determined by the management command you pass to Sm_PolicyApi_ManagementCommand().