protected virtual void Dispose(bool isDisposing) { if (!isDisposing) { return; } _disposeCalled = true; // We cannot set routing table and cluster conn pool to null as we do not want get NPE in concurrent call of dispose and acquire _routingTable.Clear(); _clusterConnectionPool.Dispose(); // cannot set logger to null here otherwise we might concurrent call log and set log to null. }
protected virtual void Dispose(bool isDisposing) { if (!isDisposing) { return; } _clusterView = null; if (_clusterConnectionPool != null) { _clusterConnectionPool.Dispose(); _clusterConnectionPool = null; } _logger = null; }