This repository has been archived by the owner on Sep 14, 2018. It is now read-only.
Memory leak per execution for CompiledCode #1228
Comments
Long delay, for which I'm sorry - can you provide |
Thanks for the reply. I attached the two scripts described above here. |
Haven't checked yet. The trigger seems to be a bit different than the other cases but I haven't compared it yet. |
I tried pulling and testing that fix on my own. It does not seem to help with my case. |
This issue was moved to IronLanguages/ironpython2#114 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
IronPython seems to leak memory every time I set a variable via compiled Python scripts. The memory seems to get collected if I let the CompiledCode object go out of scope, but I want to be able to reuse one CompiledCode many times because of the speed benefits. The leak does not happen when I execute the ScriptSource instead of CompiledCode. It also doesn't happen when I set the variables in the scope via ScriptScope.SetVariable instead of setting them in Python.
Setting values this way:
leaks much faster than:
I have reproduced the issue using the below program in 64-bit .NET 4.5 with both IronPython 2.7.4 and 2.7.5. The Script.py I used is similar to the first Python script above: I set 100000 dictionary entries individually. Other variations of the C# program I have tried that do not help with the leak:
If it helps, I ran the above leaking program in windbg and after many loop iterations, here are the biggest heap stats given by "!dumpheap -stat":
The text was updated successfully, but these errors were encountered: