mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Change object to byte to reduce overhead
This commit is contained in:
parent
78d8dbbc14
commit
bad5504de4
1 changed files with 4 additions and 4 deletions
|
|
@ -15,17 +15,17 @@ namespace Flow.Launcher.Core.Plugin
|
|||
|
||||
private readonly AssemblyName assemblyName;
|
||||
|
||||
private static readonly ConcurrentDictionary<string, object> loadedAssembly;
|
||||
private static readonly ConcurrentDictionary<string, byte> loadedAssembly;
|
||||
|
||||
static PluginAssemblyLoader()
|
||||
{
|
||||
var currentAssemblies = AppDomain.CurrentDomain.GetAssemblies();
|
||||
loadedAssembly = new ConcurrentDictionary<string, object>(
|
||||
currentAssemblies.Select(x => new KeyValuePair<string, object>(x.FullName, null)));
|
||||
loadedAssembly = new ConcurrentDictionary<string, byte>(
|
||||
currentAssemblies.Select(x => new KeyValuePair<string, byte>(x.FullName, default)));
|
||||
|
||||
AppDomain.CurrentDomain.AssemblyLoad += (sender, args) =>
|
||||
{
|
||||
loadedAssembly[args.LoadedAssembly.FullName] = null;
|
||||
loadedAssembly[args.LoadedAssembly.FullName] = default;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue