The on UNLOAD event triggers in a script when the script is unloaded.
Read access levels to get more info about the <level> field.
You can use this event to allow a script to cleanup, e.g. unsetting variables it did need.
This example would at first echo that the script is unloaded and then unset all variables beginning with xyz.