-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup helper domain not unloaded after dispose (Or: how to implement a recycle strategy) #492
Comments
If I uncomment this line, the problem goes away: Is there any reason that it is commented out? |
Interesting IIRC I couldn't make the line work. Can you send a pr with the line uncommented? It could also be that I commented because of reported issues (but then git blame should show it, which it isn't) |
It was already commented out when the entire class was introduced: a76daaa I'll fix a PR with a test shortly |
See #493 |
#463 is a duplicate of this. |
Hi there, is there any plan to get this issue fixed? I am experiencing the same problem. Are there any drawbacks to the proposed solution? |
Any updates on this? |
I'm not developer of RazorEngine, but I want to share our experience. |
Hello,
I'm trying to implement a recycle policy that after a certain number of recompilations will reload the AppDomain and cleanup memory and temp files. The only way I have found so far is to simply dispose IsolatedRazorEngineService and create a new one. This will unload AppDomain used for rendering and clean up some memory and it seemed fine at beginning.
Unfortunately, the appdomain created in CrossAppDomainCleanUp (called "CleanupHelperDomain_") is not unloaded during dispose and a new AppDomain will be created for every new IsolatedRazorEngineService, resulting in small memory leaks.
Example:
Is this a bug or am I doing something wrong? What is the best way to implement a recycle strategy?
Any help appreciated.
The text was updated successfully, but these errors were encountered: