mnoGoSearch 3.3.9 reference manual: Full-featured search engine software
Prev |  | Next

# UdmAgentFree

## Name

UdmAgentFree -- Closes a search session

## Description

`void UdmAgentFree(UDM_AGENT* Agent);`

Closes a previously initialized search session, and deallocated the variable if it was allocated by `UdmAgentInit()`.

## Parameters

`Agent`

  Pointer to a variable of type UDM_ENV.

## Return Values

None.

## Examples

Example 1. `UdmAgentFree` example #1

    UDM_ENV *Agent;

    if (!(Agent= UdmAgentInit(NULL)))
    {
      printf('Fatal error: could not allocate Agent');
      exit(1);
    }
    ...
    UdmAgentFree(Agent);

Example 2. `UdmAgentFree` example #2

    UDM_ENV Agent;

    if (!UdmAgentInit(&Agent))
    {
      printf('Fatal error: could not initialize Agent');
      exit(1);
    }
    ...
    UdmAgentFree(&Agent);

## See Also

`UdmEnvInit`
`UdmEnvFree`
`UdmAgentInit`

Prev | Home | Next
UdmAgentInit | Up | UdmAgentAddLine