On 3/21/14, 10:23 PM, K. Gadd wrote: > A hypothetical scenario (please ignore any minor detail errors, I'm > using this to illustrate the scenario): Let's say I have a main > document and it spawns 3 popup windows as documents. The popup windows > have references to the parent document and use them to post messages > to the parent document for the purposes of collaboration. Now, let's > say I want the popups to *keep working* even if the parent document is > closed.
By "keep working" do you mean that the popup windows should still be able to post messages to the main document, and its event handlers should still be firing? > In this scenario, the popups *need* to retain their references > to the parent document, but we don't want to leak the parent document > after all 3 of them are closed. Why are weak references useful here? Suppose we're just using strong references, i.e. the web as it is today. After the main window and all three popups are closed, why would the parent document leak? -j _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform