Exemple #1
0
    private void onStopStreaming()
    {
        streaming = false;

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

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

        foreach (var s in sensors)
        {
            var sensor = s.Value;
            if (sensor != null)
            {
                sensor.Dispose();
            }
        }
        sensors.Clear();
        sensorOptions.Clear();
    }
 private void onStopStreaming()
 {
     streaming = false;
     device    = null;
     if (streams != null)
     {
         streams.Dispose();
         streams = null;
     }
     sensors.Clear();
 }