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)?

   Revocable proxies are useful to avoid leaks when you don't know (1) but you 
do know (2).  Of course, if you know both, you don't need either.

And it seems if you know neither, you're kind of hosed anyway. But the XPCOM use-case is just one of many such (Java, C# or really the CLR). What's different there? Just askin'!

/be
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to