If you are in a threaded environment, and you want to clean up resources, such as memory and open LDAP connections, use CEXP_Shutdown.