On 7/12/13 4:31 PM, Patrick Walton wrote:
On 7/12/13 1:27 PM, Boris Zbarsky wrote:
What keeps the "X" that is a child of "2" alive?

Interesting question. I had assumed that X's were kept alive by their
parents.

Consider this DOM fragment, disconnected from the document:

    X
   / \
  1   2

JS is holding a reference to 1 in a global variable.

What keeps 2 alive? What keeps X alive? They both need to remain alive... What frees X if the page stops referencing 1?

I can write an example of a script that would produce such a situation, if desired.

If there is no wrapper created for a node, then the ways that that node
can be destroyed seem limited to me

Well, it can be (needs to be!) destroyed when no one is referencing it anymore on the Rust side... how do we detect that?

-Boris
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to