memory safety and weak references

Brendan Eich brendan at
Mon Apr 1 14:08:25 PDT 2013

Marius Gundersen wrote:
> This is why I suggested, in the other thread, a system for weak event 
> listeners. This would not be a problem if the only allowed argument to 
> a weak reference is a function. An iterable weak set of functions 
> would not have this problem, would solve the suggested usecases for 
> weak references (observables/events):

WeakMaps are useful for membranes too, not just "event listeners":


More information about the es-discuss mailing list