0

logHopefully someone can help.

I've added a web browser component to my form and I've noticed a memory leak when calling a JavaScript function repeatedly.

Every time I run (this command gets called every 2 - 3 seconds):

browser.Document.InvokeScript("TestFunction", new object[] { "Test", "Test" });

The memory just keeps rising until I get a crash with an out of memory warning.

Has anyone else noticed memory problems when invoking a script with an object?

UPDATE:

Added the test function I have been calling. The leak happens with any JS I call with arguments.

function TestFunction(var1, var2)
{
  console.log(var1 + " " + var2);
}
Strikeforce
  • 361
  • 4
  • 15
  • 1
    Please show the code of "TestFunction" – Matt Feb 26 '14 at 16:22
  • I will expect some tihng like this to happen if `TestFunction` holds a reference to the arguments, like puting them on an array somewhere. – Prusse Feb 26 '14 at 16:22
  • Possible duplicate of [How to Fix the Memory Leak in IE WebBrowser Control?](http://stackoverflow.com/questions/904478/how-to-fix-the-memory-leak-in-ie-webbrowser-control) – arodebaugh Dec 01 '15 at 21:04

0 Answers0