/// <inheritdoc/> public void Dispose() { if (updater != null) { updater.Dispose(); updater = null; } if (adcChannel != null) { adcChannel.Dispose(); adcChannel = null; } isInitialized = false; }
public void Dispose() { if (m_Updater != null) { m_Updater.Dispose(); m_Updater = null; } // Dispose each pin lock (m_Pins) { foreach (var pinKey in m_Pins.Keys.ToArray()) { m_Pins[pinKey].Pin.Dispose(); m_Pins.Remove(pinKey); } } m_Pins = null; }
/// <inheritdoc/> public void Dispose() { if (updater != null) { updater.Dispose(); updater = null; } // Dispose each pin lock (pins) { for (int i = pinCount - 1; i >= 0; i--) { if (pins.ContainsKey(i)) { pins[i].Pin.Dispose(); pins.Remove(i); } } } pins = null; }
/// <inheritdoc/> public void Dispose() { if (updater != null) { updater.Dispose(); updater = null; } if (buttonPin != null) { buttonPin.Dispose(); buttonPin = null; } if (xChannel != null) { xChannel.Dispose(); xChannel = null; } if (yChannel != null) { yChannel.Dispose(); yChannel = null; } isInitialized = false; }