don't dispose lighting systems in the destructors

This commit is contained in:
Ell 2022-11-24 21:01:07 +01:00
parent 01575ed42d
commit acffc054bf
3 changed files with 1 additions and 9 deletions

View file

@ -5,10 +5,6 @@ namespace Illumilib.System {
public abstract LightingType Type { get; }
~LightingSystem() {
this.Dispose();
}
public abstract bool Initialize();
public abstract void SetAllLighting(float r, float g, float b);
@ -23,9 +19,7 @@ namespace Illumilib.System {
public abstract void SetMouseLighting(float r, float g, float b);
public virtual void Dispose() {
GC.SuppressFinalize(this);
}
public virtual void Dispose() {}
}
}

View file

@ -18,7 +18,6 @@ namespace Illumilib.System {
}
public override void Dispose() {
base.Dispose();
this.ClearBitmap();
try {
LogitechGsdk.LogiLedShutdown();

View file

@ -21,7 +21,6 @@ namespace Illumilib.System {
}
public override void Dispose() {
base.Dispose();
try {
this.chroma?.UninitializeAsync();
} catch {