/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> protected virtual void Dispose(bool disposing) { handle.SafeDispose(); if (index != null) { index.Dispose(); } }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> protected virtual void Dispose(bool disposing) { if (handle != null && !handle.IsInvalid) { handle.Dispose(); } if (index != null) { index.Dispose(); } }