Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: I get memory leaks without running CollectGarbage

0
0
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
 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

Viewing all articles
Browse latest Browse all 2297