1. #1
    Sencha User
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    6
    Vote Rating
    0
    ggranum is on a distinguished road

      0  

    Exclamation Memory Leak in IE while using Frames

    Memory Leak in IE while using Frames


    When including the ExtJS v 1.1.1 file with any frame, that frame will leak memory. There does not need to be any content, simply a Frameset containing a single child frame that includes ext-base.js and either ext-all.js ext-all-debug.js.

    The cause is the setInterval for, ironically, the garbageCollector thread.

    We have a very large web application and our dialogs use frames, and some of those frames are using Ext tables. On closing one of these dialogs, IE would leak upwards of 15MB on each open-close. The setInterval seems to prevent IE from collecting anything that has to do with the window.

    This memory is not returned when the opener window navigates away from the web application. The only way to free the memory is to fully close IE and restart it.

    To fix this we did two things in ext-all and ext-all-debug: Fixed the incorrect reference to
    El.collectorThreadId:
    (around line 3940: ) El.collectorThread = setInterval(El.garbageCollect, 30000);

    Note that the 'clearInterval' is clearing El.collectorThread, not El.collectorThreadId.

    We also clear the interval on window close. To do this we tossed the following line of code in to the _onunload method of the Event class. Probably not the correct place for it, but it works.

    (Around line 8812: )
    _onUnload: function(e, me) {
    clearInterval(Ext.Element.collectorThread);
    Ext.dd.DragDropMgr.unregAll();
    },

    A warning: prototype.js 1.5.1 and up has a similar leak, though prototypes leak does not increase memory on refresh, only on a full window open/close cycle.

    I personally find it easiest to test this using perfmon, with the counter on 'Process(iexplore)\Working Set.

    I do not know if this bug occurs in later version of extJs. I did not do full testing in all browsers; I know that with the broken prototype.js and extJs our application leaked in IE 6, 7 and 8 beta 1.

    cheers,
    Geoff Granum

  2. #2
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    This is important to do during frame cleanup on IE:

    Code:
    if(Ext.isIE && this.iframe){
        this.iframe.dom.src = 'javascript:false';
        Ext.removeNode(this.iframe.dom); //recommended 
      }
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  3. #3
    Ext User
    Join Date
    Sep 2008
    Posts
    1
    Vote Rating
    0
    hafeyang is on a distinguished road

      0  

    Question my experience

    my experience


    when I use tab control with iframe in ie6,I found sometimes I can not focus on the textbox, when I clicked the textbox . but displayed the aotucomplete information by explorer.

    what is strange more ,I can click the dropdownlist (with select tag) or any other control .

  4. #4
    Ext User
    Join Date
    Jun 2008
    Posts
    8
    Vote Rating
    0
    bcmatz is on a distinguished road

      0  

    Exclamation ((BUZZ)) - Same Issue!

    ((BUZZ)) - Same Issue!


    Having the sames issues as hafeyang
    Jack: Any fixes for this ?!?

  5. #5
    Ext User
    Join Date
    Jul 2009
    Location
    xiamen
    Posts
    3
    Vote Rating
    0
    Glug-LP is on a distinguished road

      0  

    Default


    omg...
    Touching melody..........

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    5
    Vote Rating
    0
    Francol is on a distinguished road

      0  

    Default


    Don't know if i should start another topic, but i'd like to revive the current issue, since no reasonable solutions were suggested. Sorry for being outdated, but issue remains.. Please