Gtnportal 3510.2

GTNPORTAL-3510 Possible memory leaks, consistency issues and concurrency issues in ScriptGraph