Detaching from a Services Manager with isc_service_detach( )
From InterBase
Go Up to Overview of the Services API
Use isc_service_detach() after you finish your tasks with the Services API, to end the connection with the Services Manager. Following is a C/C++ code example of terminating the connection, assuming you have acquired a valid service handle from isc_service_attach().
Detaching from a Services Manager in C/C++
isc_service_detach(status, &service_handle);