diff --git a/RGB.NET.Core/Devices/AbstractRGBDevice.cs b/RGB.NET.Core/Devices/AbstractRGBDevice.cs index 7be5ab0..7d3ac1d 100644 --- a/RGB.NET.Core/Devices/AbstractRGBDevice.cs +++ b/RGB.NET.Core/Devices/AbstractRGBDevice.cs @@ -87,6 +87,12 @@ namespace RGB.NET.Core UpdateLeds(ledsToUpdate); } + /// + public virtual void Dispose() + { + LedMapping.Clear(); + } + /// /// Performs device specific updates. /// diff --git a/RGB.NET.Core/Devices/IRGBDevice.cs b/RGB.NET.Core/Devices/IRGBDevice.cs index a730e2b..f80b1d7 100644 --- a/RGB.NET.Core/Devices/IRGBDevice.cs +++ b/RGB.NET.Core/Devices/IRGBDevice.cs @@ -1,11 +1,12 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace RGB.NET.Core { /// /// Represents a generic RGB-device /// - public interface IRGBDevice : IEnumerable, IBindable + public interface IRGBDevice : IEnumerable, IBindable, IDisposable { #region Properties