Now loading the whole script as text into the memory and therefrom using evalInSandbox to run YouTube Center instead of loadSubScript. Hopefully loadSubScript was the problem and this is more memory leak free.