/// oLight Clean Up Event // 如果结构体还没被清理 if (variable_instance_exists(id, "light_struct") && light_struct != undefined) { // 大多数 Bulb 版本不需要手动调用 destroy,因为它们使用弱引用自动清理 // 但为了 100% 的鲁棒性,如果有 .Free() 或 .Destroy() 方法,请调用它 // 简单做法:直接设为 undefined,Bulb 的垃圾回收机制通常会处理掉它 light_struct = undefined; }