cat_close - deallocate a session context
#include <cat.h>
int cat_close(cat_session *session);
Deallocates a session context, frees any filters on the session context's
filter stacks, and destroys any user data. It also invokes all callbacks
installed for this session with calls to cat_onclose().
The function returns CAT_OK if successful, or a negative error code otherwise. Specifically, it returns CAT_EBUSY if the session is in use and therefore cannot be closed.
cat, cat_onclose