Correct,
I am basically wanting to perform my original code sample without leaking code and without having to take the hit of calling CollectGarbage(true) on every call like so:
loop { // this loop runs many times
That works but it does not perform the best.
Thanks
I am basically wanting to perform my original code sample without leaking code and without having to take the hit of calling CollectGarbage(true) on every call like so:
loop { // this loop runs many times
var items = new List<int>(); // This list grows over time.
_engine.Script.foo(items);
_engine.CollectGarbage(true);
}That works but it does not perform the best.
Thanks