Runtime API / Method

NodeScriptSelfApi.destroy

从 Node Script 内幂等销毁 owning Instance 及其所有权子树。

使用说明

await ctx.self.destroy() 会递归释放 parent-owned descendants、listeners、scheduled tasks、HTML surfaces、pointer captures 与资源引用。重复调用不会重复 teardown;销毁开始后不要再排入新的 mutation。