We use CSharpCodeProvider to create and execute an assembly at
run-time. This is done over and over, and we have started to get
memory leaks. I found an explanation in this article (under "Assembly
Leaks"):
http://msdn.microsoft.com/msdnmag/is...s/default.aspx
It says that I need to execute the assembly in a child AppDomain
instead of the application's own AppDomain. But how do I do this? My
code works on the following basis, and I don't know where or how to
specify which AppDomain I want to compile into.
CSharpCodeProvider provider = ...
AppDomain child = AppDomain.CreateDomain("child");
....
CompilerResults cr = provider.CompileAssemblyFromDom(...);
Eq.