Transformer Pipeline Module API Reference (JavaScript)
8.0.2.290852-a608fcd3
|
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:
JavaScript 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.