remove tabs from DOM - browser memory usage

  1. #1

    remove tabs from DOM - browser memory usage

    hello, im using this code to add tabs with iframes to tabpanel:

    var addTab = function (tabPanel, id, tytul, url) {
        var tab = tabPanel.getComponent(id);
        if (!tab) {
            tab = tabPanel.add({
                id: id,
                title: tytul,
                closable: true,
                padding: 5,
                autoLoad: {
                    showMask: true,
                    url: url,
                    mode: "iframe",
                    maskMsg: "Ładowanie " + tytul + "..."
                }
            });
            tab.on("activate", function () {
                var item = MenuPanel1.menu.items.get(id + "_item");
                if (item) {
                    MenuPanel1.setSelection(item);
                }
            }, this);
            tab.on("beforeclose", function () { Ext.getDom(TabPanel1.getActiveTab()).remove(); }, this);
        }
        tabPanel.setActiveTab(tab);
    }
    Problem is that browser memory usage is still groving even i close the tabs and reopen browser is taking more memory each time.
    i tried with beforeclose event without luck.
    How to clean DOM from closed tab? and maybe from other unused elements?
  2. #2
    memory usage even above 1GB is generated by FIREBUG - in firefox - without firebug enabled is at 100-200MB so its normal,
    and i also added closeaction destroy to my tabpanels.
    This thread may be closed.
  3. #3
    Hi,

    Yes, it can be a browser issue as well.

    Please see:
    http://forums.ext.net/showthread.php?16024

Similar Threads

  1. [CLOSED] Move tabs Tabs Style Google Chrome
    By majunior in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 30, 2013, 12:58 PM
  2. ComponentColumn usage
    By Zdenek in forum 2.x Help
    Replies: 0
    Last Post: Jul 13, 2012, 9:38 AM
  3. Browser memory keeps slowly growing
    By micky in forum 1.x Help
    Replies: 6
    Last Post: May 28, 2012, 5:50 PM
  4. Licence (CMS/CRM usage)
    By pentijum in forum Licensing
    Replies: 1
    Last Post: May 02, 2011, 5:28 AM
  5. Not able to add/remove tabs using DirectMethod
    By paul-2011 in forum 1.x Help
    Replies: 3
    Last Post: Mar 16, 2011, 10:17 PM

Posting Permissions