In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.
Comments: Hi again, We're still unable to reproduce a memory leak using your test application on Windows 7 or 10. Clicking on the "Test VB-Script" button multiple times increases memory usage at first, but it levels off after a few dozen iterations and then remains stable through several hundred additional iterations. Please see the attached screenshot from Windows 10. We've also run a different test that uses a single `VBScriptEngine` instance to evaluate random `x ± y` expressions _millions_ of times, with similar results. Memory usage goes up initially but levels off quickly. Unfortunately we can't explain why our results differ from yours. VBScript is a COM component and therefore subject to registry-based redirection, but that's just a wild guess. Would it be possible for you to run the test on a different machine or clean VM to determine whether you can reproduce the leak consistently? Thanks!
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.
Comments: Hi again, We're still unable to reproduce a memory leak using your test application on Windows 7 or 10. Clicking on the "Test VB-Script" button multiple times increases memory usage at first, but it levels off after a few dozen iterations and then remains stable through several hundred additional iterations. Please see the attached screenshot from Windows 10. We've also run a different test that uses a single `VBScriptEngine` instance to evaluate random `x ± y` expressions _millions_ of times, with similar results. Memory usage goes up initially but levels off quickly. Unfortunately we can't explain why our results differ from yours. VBScript is a COM component and therefore subject to registry-based redirection, but that's just a wild guess. Would it be possible for you to run the test on a different machine or clean VM to determine whether you can reproduce the leak consistently? Thanks!