The client is responsible for detaching connections intelligently. The client can keep a connection active for use by the same or another application. This eliminates the overhead associated with making an actual attachment.
However, if additional resources are required to open a connection to another server, the client/library can determine which connections are no longer needed and which is best to detach. It is very important that every time a connection is opened, it be closed when no longer needed.
A connection handle can be closed by calling NWCCCloseConn.
A connection reference is cleared by following these steps:
NWCCSysCloseConnRef forces a server connection detach (used in conjunction with NWCCMakeConnPermanent).
IMPORTANT:Use caution when calling NWCCSysCloseConnRef because other applications on the workstation might be using the connection.