How to create a memory leak in Ignition?

Might sound like a weird question but I think it can be informative. Inspired when I was reading this thread -

Ignition uses jython and normally handles threading on its own unless told otherwise, so the ways described in the above post aren’t obvious how you would do them in an Ignition program. What are the ways that Ignition developers can create a memory leak in our scripting or design decisions, so that we know what to avoid or refactor?

One that comes to mind would be a long-lived async thread. As @pturmel has mentioned on more than one occasion, you need to interrupt and replace/merge the thread when calling it a second time to prevent creating more than a single instance.

1 Like