Before exiting, a Client-Library application must:
Deallocate all command structures for each connection.
Close and deallocate all open connections.
Exit Client-Library.
Deallocate all context structures.
As noted in “Exiting Client-Library”, step 2 can be included with step 3.