Memory leak in ScriptRunner when running scripts from file

Describe the bug
When running script (javascript for automation) from file the program will leak memory. The process leaking is BetterTouchToolScriptRunner. There wont be leaks if the script is entered directly as "Enter Apple Script as Text". I was getting warning from mac and it had reached somewhere around 50GB memory (I've added a screenshot with ~10GB memory leak.

It should be noted my script run every .25 second.

The widget I'm using is "run applescript and show return value".

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Macbook pro touch bar.


Device information:

  • Type of Mac: MacBook Pro (15-inch, 2016)
  • macOS version: 10.13.6 (17G65)
  • BetterTouchTool version: 2.645

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):
Workaround: Write script directly instead of running from file.

Interesting, thanks for reporting, I'll check if it can be fixed (some parts of the execution are completely handled by the system and I have run into very weird issues with Apple Script before, so let's see :slight_smile: )