Global objects in Perspective Scope

No. Unless the project script that defines the class includes code to replace any persistent instances whenever the script restarts. Jython class instances reference the code that defines them, which will be old code after the defining script restarts. That old code lives in an old interpreter, which leaks huge chunks of memory. Be absolutely sure you replace custom class instances in any persistent use. That isn't limited to just .getGlobals() or my system .util.persistent() function, but would include anywhere you've added a listener into Ignition's infrastructure.

2 Likes