I have been using the JScript eval() method from C# to evaluate
conditional logic at run-time. I found that implementing a solution
similar to the example posted at:
http://www.odetocode.com/Code/80.aspx, seems to handle memory the most
efficiently. However, if executing in a tight loop (say, while(true){//
jscript eval}, JScript will leak memory and grow the virtual memory
until the performance of the machine has been degraded significantly. I
have noticed however that if I do not evaluate regular expressions the
JScript eval works wonderfully. If I eval a regex though (i.e.
/foo/.test('foobar')), the memory will leak as I described above. I
have searched and searched for any information about this and have not
been able to find anything. Should I be posting this to the JScript
group for this kind of information? Does anyone know why JScript leaks
memory like that (only under certain conditions)?
Thanks,
Mitch