@@ -24,14 +24,14 @@ internal class AssemblyManager
2424 // than it can end up referring to assemblies that are already unloaded (default behavior after unload appDomain -
2525 // unless LoaderOptimization.MultiDomain is used);
2626 // So for multidomain support it is better to have the dict. recreated for each app-domain initialization
27- private static ConcurrentDictionary < string , ConcurrentDictionary < Assembly , string > > namespaces ;
28-
27+ private static ConcurrentDictionary < string , ConcurrentDictionary < Assembly , string > > namespaces =
28+ new ConcurrentDictionary < string , ConcurrentDictionary < Assembly , string > > ( ) ;
2929 //private static Dictionary<string, Dictionary<string, string>> generics;
3030 private static AssemblyLoadEventHandler lhandler ;
3131 private static ResolveEventHandler rhandler ;
3232
3333 // updated only under GIL?
34- private static Dictionary < string , int > probed ;
34+ private static Dictionary < string , int > probed = new Dictionary < string , int > ( 32 ) ;
3535
3636 // modified from event handlers below, potentially triggered from different .NET threads
3737 private static ConcurrentQueue < Assembly > assemblies ;
@@ -48,10 +48,7 @@ private AssemblyManager()
4848 /// </summary>
4949 internal static void Initialize ( )
5050 {
51- namespaces = new ConcurrentDictionary < string , ConcurrentDictionary < Assembly , string > > ( ) ;
52- probed = new Dictionary < string , int > ( 32 ) ;
53- //generics = new Dictionary<string, Dictionary<string, string>>();
54- assemblies = new ConcurrentQueue < Assembly > ( ) ;
51+ assemblies = new AssemblyList ( 16 ) ;
5552 pypath = new List < string > ( 16 ) ;
5653
5754 AppDomain domain = AppDomain . CurrentDomain ;
0 commit comments