when get dynamic compiled assemblies unloaded?
Hello,
since all (temporary) compiled assemblies produced and attached by report.Prepare() are loaded into the default AppDomain they never will be unloaded -- when will the process be out of handles?
since all (temporary) compiled assemblies produced and attached by report.Prepare() are loaded into the default AppDomain they never will be unloaded -- when will the process be out of handles?
Comments
Dynamic assemblies are never unloaded. If you prepare thousands of reports, you will run out of memory (each report assembly is about 50kb).
The solution is to create new AppDomain and execute the report in it. When you no longer need the report, unload the domain. Creating/unloading domains is rather slow (10x slower than just creating a new instance of report), that's why we didn't implement that method in FastReport. But, at the application level, you may optimize this process. You may create a domain and use it, say, 1000 times, then unload it. In this case the performance hit will not so big.