On 12/3/13 4:43 AM, Brendan Eich wrote:
Andrew McCreight wrote:
As far as I understand it, weak references are useful to avoid leaks
when you don't know (1) who is referring to you or (2) what your
lifetime should be.

Yes. Doesn't nsIObserver still need XPCOM weak refs due to the
conjunction of (1) and (2)?

"Need" is a strong word.

Our current view of weak nsIObserver is that they're an attractive nuisance that makes you think you can be lazy and don't need to removeObserver while in reality that just means you leak memory inside the observer service.... (though you don't leak your own memory).

-Boris
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to