The object scripts are loaded to perform the procedure related to the invoking event (and any procedures called in it), then destroyed.

Therefore the variables declared at the module level (headers declarations) can serve to share the variables between procedures invoked within the same execution session, but not used for the persistence of the values between a code execution and the next one; since they are also created and destroyed at each script execution.

For the same reason, the use of the Static declaration has limited effectiveness to the current execution session, not allowing the persistence of the value between two different executions.

Likewise, public objects, object instances, predefined functions that keep references to objects (for example, the functions for managing the serial), references to open files, etc ... are destroyed at the end of the execution linked to an event.