Skip to content

Commit bad5504

Browse files
committed
Change object to byte to reduce overhead
1 parent 78d8dbb commit bad5504

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ internal class PluginAssemblyLoader : AssemblyLoadContext
1515

1616
private readonly AssemblyName assemblyName;
1717

18-
private static readonly ConcurrentDictionary<string, object> loadedAssembly;
18+
private static readonly ConcurrentDictionary<string, byte> loadedAssembly;
1919

2020
static PluginAssemblyLoader()
2121
{
2222
var currentAssemblies = AppDomain.CurrentDomain.GetAssemblies();
23-
loadedAssembly = new ConcurrentDictionary<string, object>(
24-
currentAssemblies.Select(x => new KeyValuePair<string, object>(x.FullName, null)));
23+
loadedAssembly = new ConcurrentDictionary<string, byte>(
24+
currentAssemblies.Select(x => new KeyValuePair<string, byte>(x.FullName, default)));
2525

2626
AppDomain.CurrentDomain.AssemblyLoad += (sender, args) =>
2727
{
28-
loadedAssembly[args.LoadedAssembly.FullName] = null;
28+
loadedAssembly[args.LoadedAssembly.FullName] = default;
2929
};
3030
}
3131

0 commit comments

Comments
 (0)