dispose the connector when the connection gets disposed