Forum: Building VoltDB Clients

Post: Closing the Connection in the c++ client?

Closing the Connection in the c++ client?
DerekPK
Jan 8, 2014
Hello,

The documentation "3.3.4. Closing the Connection" states that a connection should be closed when finished.

try {
client.drain();
client.close();
} catch (InterruptedException e) {
e.printStackTrace();
}

Is this only for Java?

The c++ client does not appear to have a close method, do I need to worry about this?

Thanks.
DerekPK
Jan 8, 2014
OOPS!

Read a bit more,

"The client objects destructor automatically closes the connection when your application leaves the context or scope within which the client is defined."