【发布时间】:2010-09-20 23:16:38
【问题描述】:
在 JavaScript 中有什么方法可以创建对另一个对象的“弱引用”? Here is the wiki page describing what a weak reference is. Here is another article that describes them in Java. 谁能想到在 JavaScript 中实现这种行为的方法?
【问题讨论】:
-
正在讨论 ES6 的弱引用。擦亮眼睛。
-
*wiki.ecmascript.org/doku.php?id=strawman:weak_refs 上的官方规范 wiki/讨论,当前“最后修改时间:2013/02/02 22:25” *esdiscuss.org/topic/what-is-the-status-of-weak-references 上的一些其他规范讨论,当前最后发布“Sun Mar 3 2013 年太平洋标准时间 11:56:05”
-
在大多数情况下,WR 试图解决Lapsed Listener Problem,在此讨论:[stackoverflow.com/questions/43758217/…。如果这个问题有一个好的答案,我认为不需要 WR。
-
@supercat 我已经发布了answer to the lapsed listener question。
标签: javascript weak-references