Closes a connection to a Galil Controller.
GClose()
be called whenever a program is finished with a controller. This includes when a program closes. A rule of thumb is that for every GOpen()
call on a given connection, a GClose()
call should be found on every code path. Failing to call GClose() may cause controller resources to not be released or can hang the process if there are outstanding asynchronous operations. The latter can occur, for example, if a call to GRead() times out and the process exits without calling GClose(). In this case, GRead() still has an outstanding asynchronous read pending. GClose() will terminate this operation allowing the process to exit correctly.g | Connection's handle. |
See x_examples.cpp for an example.