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

@@ -83,6 +83,15 @@ namespace RGB.NET.Devices.SteelSeries
ApplyLayoutFromFile(PathHelper.GetAbsolutePath(this, @"Layouts\SteelSeries", $"{layoutPath}.xml"), layout, true);
}
/// <inheritdoc />
public override void Dispose()
{
try { UpdateQueue?.Dispose(); }
catch { /* at least we tried */ }
base.Dispose();
}
#endregion
}
}
@@ -117,11 +117,11 @@ namespace RGB.NET.Devices.SteelSeries
/// <inheritdoc />
public void Dispose()
{
try
{
SteelSeriesSDK.Dispose();
}
catch {/* shit happens */}
try { UpdateTrigger?.Dispose(); }
catch { /* at least we tried */ }
try { SteelSeriesSDK.Dispose(); }
catch { /* shit happens */ }
}
#endregion