且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

销毁打字稿中的循环引用实例?

更新时间:2022-12-23 23:21:17

如果没有引用a或b,则垃圾收集器会将其标记为不可访问并一起清理,您无需手动执行任何操作.

If there's no reference to a or b it will be marked as unreachable by the garbage collector and be cleaned together, you don't have to do anything manually.

您可以在javascript 此处.

You can find more about how garbage collectors work in javascript here.