An application calls ct_exit to exit Client-Library for a specific context. ct_exit closes and deallocates any open connections and cleans up internal Client-Library data space. ct_exit must be the last Client-Library call for a context.
Because ct_exit closes and deallocates all open connections, it is not strictly necessary for an application to close and deallocate connections by calling ct_close and ct_con_drop; instead, the application can just call ct_exit.