From bad5504de4ad9bcc70a69c484a5fd71ab2d88eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Mon, 12 Apr 2021 19:34:58 +0800 Subject: [PATCH] Change object to byte to reduce overhead --- Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs index 98dbe3080..515b0bedc 100644 --- a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs @@ -15,17 +15,17 @@ namespace Flow.Launcher.Core.Plugin private readonly AssemblyName assemblyName; - private static readonly ConcurrentDictionary loadedAssembly; + private static readonly ConcurrentDictionary loadedAssembly; static PluginAssemblyLoader() { var currentAssemblies = AppDomain.CurrentDomain.GetAssemblies(); - loadedAssembly = new ConcurrentDictionary( - currentAssemblies.Select(x => new KeyValuePair(x.FullName, null))); + loadedAssembly = new ConcurrentDictionary( + currentAssemblies.Select(x => new KeyValuePair(x.FullName, default))); AppDomain.CurrentDomain.AssemblyLoad += (sender, args) => { - loadedAssembly[args.LoadedAssembly.FullName] = null; + loadedAssembly[args.LoadedAssembly.FullName] = default; }; }