Hi I have a script that is simply:
Thanks
function foo(items) {
items.toSomething(); // toSomething is a .NET function that does something to the list and returns a new one.
}
loop { // this loop runs many times
var items = new List<int>(); // This list grows over time.
_engine.Script.foo(items);
}
I find that if I do not collect garbage eventually I end up with a memory leak, what is it holding onto I assume the collection passed into the method? running garbage collection impacts my performance, is there something else I can do?Thanks