Skip to content
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

Memory leak when executing scripts in a loop dynamically in process #598

Closed
gimatech opened this issue Dec 8, 2020 · 2 comments
Closed

Comments

@gimatech
Copy link

gimatech commented Dec 8, 2020

Hello,

Calling the ScriptRunner Execute method in a loop leads to a memory leak due to the fact the event AppDomain.CurrentDomain.AssemblyResolve (subscribed in ScriptCompiler is never unsubscribed.

I didn't find a workaround for this
Memory Dump - Retained ref

@stevehansen
Copy link

Fix seems easy enough (I started my fork for the changes stevehansen@6f295e2) but we are also seeing if it is possible to use the .NET core assembly unloading https://docs.microsoft.com/en-us/dotnet/standard/assembly/unloadability

@filipw
Copy link
Member

filipw commented Jun 7, 2023

Fixed in #630

@filipw filipw closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants