Transformer Pipeline Module API Reference  8.0.3.342099-79b6f512
Pipeline Concepts: Script and object lifetime

Script lifetime

A pipeline script may be loaded multiple times, thus it's not possible to guarantee that the initialise-func of a script will only be called a single time. To this end, it might be best to define a separate pipeline that handles are the initialisation of the system. The sole purpose of this pipeline will be to perform initialisation and such is guaranteed to be instantiated a single time only:

# Initialisation pipeline - initialise() will only be called once
add-pipeline
id initialiser
pipeline-file pipeline.lua
initialise-func initialise
no-delay-load
end-pipeline

Object lifetime

Lua is a garbage collected language and as such there is no need to explicitly destroy any created objects or tables: they should be cleaned up as soon as your event function returns.

This may lead to the artefact that any global variables that are defined by your script are still extant when your event function is subsequently called. You should not rely on this behaviour since it may be changed in a future version of the pipeline module.


Generated on Wed Dec 4 2024 17:41:41 for Transformer Pipeline Module API Reference