Fully implemented disposing on devices

This commit is contained in:
DarthAffe committed 2020-03-03 14:50:31 +01:00
1 parent 1cfdeefde1
commit 83edbc6eac
31 files changed
+174 -33

No files matched your search

@@ -175,6 +175,9 @@ namespace RGB.NET.Devices.CoolerMaster
/// <inheritdoc />
public void Dispose()
{
try { UpdateTrigger?.Dispose(); }
catch { /* at least we tried */ }
if (IsInitialized)
foreach (IRGBDevice device in Devices)
{
@@ -74,6 +74,9 @@ namespace RGB.NET.Devices.CoolerMaster
/// <inheritdoc cref="AbstractRGBDevice{TDeviceInfo}.Dispose" />
public override void Dispose()
{
try { UpdateQueue?.Dispose(); }
catch { /* at least we tried */ }
_CoolerMasterSDK.EnableLedControl(false, DeviceInfo.DeviceIndex);
base.Dispose();