Original Post
I want to know who is responsible for not allowing individual assemblies to be unloaded once any references to thier content have been dropped.
While researching info for implementing scripting under .NET, I''ve come to realize that utilizing the .NET framework for anything which isnt compile once, is overly painful and really not worth the effort.
Loading it into another AppDomain just isnt feasible due to the preformance hit for AppDomaon <-> AppDomain communication and the memory hit have having the virtual address space filled with DLL images and the JITed code taking up even more space. This just gets worse with all the code generation utilities which emit custom code and dump it into the address space.
All this comes down to one ''simple'' reason; the lack of the ability unloading a single assembly once all references to its contents are dropped.
It doesnt need to be automatic and I believe assembly unloading should be explicit. Somthing like: "Assembly.Unload( ref Assembly assembly );", it can walk the entire heap & stack to vertify that the assembly is ready to unload, preform expensive operations, just as long as it allows for that operation.
Personally, the ability to unload an individual assembly would represents a much bigger improvement in functionaility in the framework that anything bar generics in the upcoming next version of C#.
Stuff in longhorn might be another story, but there isnt enough solid info yet to tell.
