Hello, I am using Nimscripter to add scripting capabilities to my program. I am using it customize the behavior of my program as per the requirement of different clients. However, I have noticed that it leaks memory whenever a script is run. Program crashes once a day because system runs out of memory.
import strformat, os
import nimscripter
proc a(n: int) =
let myScript = NimScriptFile(&"""echo "Hello World {n}" """)
let intr = loadScript(myScript)
proc main() =
for i in 0 .. int.high:
a(i)
sleep(200)
main()
This is a simple example. It ends up using a couple of gigs of RAM in 15 mins. Is this a known issue? Am I doing something wrong?