int CloseNetica_bn ( environ_ns*  env,   char*  mesg )

Call this when completely finished using the Netica system to free all resources (e.g., memory) that it is using.

env must be a pointer to a global environment initialized by a call to InitNetica2_bn. After calling this, the contents of env are invalid and should not be used.

mesg must be a pointer to a character array which is allocated at least MESG_LEN_ns characters long. A good-bye message will be left in it.

No data structure that was returned by any Netica API function will have valid contents after calling CloseNetica_bn.

Netica may be stopped (with CloseNetica_bn) and then later restarted (with NewNeticaEnviron_ns and InitNetica2_bn), but no data structures created by one session may be used by another.

If Netica closed successfully, a non-negative integer is returned, whereas if there was some problem a negative integer is returned and an error message left in mesg. Use the return value to check for an error, rather than the regular Netica error system (e.g., GetError_ns), which will not work after calling this function.

In a multi-threaded environment, ensure that only one thread calls CloseNetica_bn, and after that, no threads may use any Netica function.

Version:

This function is available in all versions.

See also:

NewNeticaEnviron_ns    Creates the environ_ns
InitNetica2_bn    Initializes the environ_ns

Example:

See InitNetica2_bn