Hey all.
I want to read all a large number of assemblies (like GAC assemblies)
and I am doing the following.
DefaultAssemblyResolver resolver = new DefaultAssemblyResolver();
...
// search using Mono.Cecil the class/interface/structs names
AssemblyDefinition currentAssembly;
if(!assembliesCache.ContainsKey(asm.FullName)) {
currentAssembly = resolver.Resolve(asm.FullName);
assembliesCache.Add(asm.FullName, currentAssembly);
}
else
currentAssembly = assembliesCache[asm.FullName];
//do something with currentAssembly..
When I finish execute this code, the memory was increased from 106,
803K to 225, 540 K.
When I close the window, I clear the dictionary (assembliesCache) and
set it to null but the memory still stays the same.
Is there any way to read the assemblies and get back to the previous
memory footprint?
Thanks.
--
--
mono-cecil