ObjectHooks.onDestroy
onDestroy() -> none
Description
This method is called when there are no longer any references to a the object, or when the script is shutting down.
Usually this is not necessary, as PHP cleans up most state and data after every request.
class MyObject { public fun onDestroy { ... } }