-
28 May 2008 9:35 AM #1
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
-
28 May 2008 1:50 PM #2
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 Dec 2008 12:51 AM #3
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 .
-
22 Jan 2009 12:17 PM #4
((BUZZ)) - Same Issue!
-
19 Aug 2009 7:39 PM #5
omg...
Touching melody..........
-
22 Sep 2011 10:30 PM #6
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


Reply With Quote

