Re: Garbage collection question on Mozilla DOM
Jonas Sicking <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > I have a quick question regarding 1.9 garbage collection behavior on > the DOM nodes. If I disconnect the top node of a subtree, will the > whole subtree be garbage collected or do I have to disconnect each of > the nodes in the subtree? Thanks. Well, when an object is unreachable it will be destroyed. So once the top node is unreachable it will be destroyed, which most likely will mean that the that nodes children are unreachable and so they will in turn be destroyed, and so on. Generally you shouldn't need to worry about making sure things get destroyed though, it should JustHappenThroughMagic(tm) / Jonas