resetForReuse

open fun resetForReuse(nullGlobalContext: Boolean)

Prepares this instance for its next user by resetting the context and any other per-user state. AbstractScriptPool calls it when an instance is returned to the pool; subclasses that hold more state, such as imports, extend it.

Parameters

nullGlobalContext

if true, sets the global scope bindings to null