Using Global Variables
Avoid creating global variables if possible. You can declare global variables in the ‘include hook’. But when using such global variable, make sure that the logic doesn’t make uncertain assumptions about which hooks are invoked at runtime and in which sequence.
Static variables can be used. However, using static variables for
optimization may be limited, because a new process may be started for handling
a new request (method invocation) that arrives in
LN.
Note: Never use any (global) variables that are created and
used in the code as generated by the
LN
Implementation Generator. They are subject to change, and compatibility is
never guaranteed.