调用所有的 destroy 钩子。 这应该只被调用一次。 如果多次调用,则会报错。 这个必须手动调用。 如果资源留给 GC 收集,则永远不会调用 destroy 钩子。

Call all destroy hooks. This should only ever be called once. An error will be thrown if it is called more than once. This must be manually called. If the resource is left to be collected by the GC then the destroy hooks will never be called.