Re: Memory fragmentation?
"Michael Vincent van Rantwijk, MultiZilla" <[email protected]> Thu, 15 Nov 2007 23:23:48 +0100
| Newsgroups | gmane.comp.mozilla.performance |
|---|---|
| Message-ID | <[email protected]> |
Boris Zbarsky wrote:
> Daniel Brooks wrote:
>> This is basically what people mean when they talk about sorting
>> allocations by lifetime. We don't know the exact lifetimes of these
>> objects in advance (because we don't know when the user will close the
>> tab), but we know that they will be destroyed together.
>
> No, we don't. DOM nodes and other refcounted things can outlive the tab
> closure and teardown of the window arbitrarily. Just have some script
> in another window referencing them.
>
> -Boris
Ah, that might explain why my 'Purge All Closed Tabs' feature isn't
actually helping in clearing/freeing memory, which FYI basically looks
like this:
while(this.savedBrowsers.length > 0) {
var targetBrowser = this.savedBrowsers.pop().browser;
targetBrowser.destroy();
this.mPanelContainer.removeChild(targetBrowser.parentNode);
}
this.mTabBox.selectedPanel = this.selectedTab.linkedBrowser.parentNode;
--
Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member (ActiveState Training Partner)
- iPhone Application Developer