public override void Dispose()
        {
            if (triggerPin != null)
            {
                triggerPin.Dispose();
            }

            if (echoPin != null)
            {
                echoPin.Dispose();
            }

            base.Dispose();
        }
Exemplo n.º 2
0
        public override void Dispose()
        {
            if (dataPin != null)
            {
                dataPin.Pin.ValueChanged -= Pin_ValueChanged;
                dataPin.Dispose();
            }

            if (clockPin != null)
            {
                clockPin.Pin.ValueChanged -= Pin_ValueChanged;
                clockPin.Dispose();
            }

            base.Dispose();
        }