Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

Refactor ServiceTracker: improve thread safety and remove unnecessary finalizer suppression

itsfatduck97e87a06b88f
diff --git a/optimizerDuck/src/UI/Logger/ServiceTracker.cs b/optimizerDuck/src/UI/Logger/ServiceTracker.cs
index 44a7c88..ef70825 100644
--- a/optimizerDuck/src/UI/Logger/ServiceTracker.cs
+++ b/optimizerDuck/src/UI/Logger/ServiceTracker.cs
@@ -1,5 +1,5 @@
-using System.Diagnostics;
-using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging;
+using System.Diagnostics;
namespace optimizerDuck.UI.Logger;
@@ -32,7 +32,6 @@ public class ServiceTracker : IDisposable
Log.LogInformation($"[{Theme.Muted}]Time: {time}[/] [dim]|[/] {stats}");
_current.Value = null;
- GC.SuppressFinalize(this); // https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1816
}