View Full Version : iframe cause memery leak in IE6?

25 Dec 2006, 1:05 AM
i create iframes in BorderLayout ,and open pages in the iframes ,like this:

var welcome = YAHOO.ext.DomHelper.append(document.body,
{tag: 'iframe', frameBorder: 0, src: 'welcome.html'});
var lv = new YAHOO.ext.ContentPanel(welcome, {title: '欢迎', fitToFrame:true, closable:true});
innerLayout.add('center', lv);

but after i click the icon on tabs ,it seems the panel is gone ,but in fact the unload not fired , memery not lowered and AD keeping popup .
is this a bug or i get something wrong?[/code]

25 Dec 2006, 2:41 AM
It's impossible to do cleanup on everything for you automatically. There's just no way for me to know what you put in a ContentPanel (CP). While I do try to auto clean up, iframes don't follow the standard convention and may present problems.

There a few things you can try though:

1) wrap the iframe in a div and set resizeEl on the CP config to the iframe. This way when it's removed and destroyed maybe it will take the iframe with it.

2) override "destroy()" on your panel and do your own clean up.

3) Probably the best option is to recycle your iframes and ContentPanels.

25 Sep 2007, 6:03 PM
Need help with IFRAME understanding.... our application has a top frame and each tabbed contentPanel uses an IFRAME. In IE6, the performance is horrible after several IFRAMES are loaded and destroyed. I have been researching on ways to improve performance, but I think I first need help in understanding something.

My question is, when an IFRAME is destroyed by clicked the X on the tabbed ContentPanel, is everything loaded in it destroyed automatically, such as listeners, DOM elements, etc?

In Firefox and IE, I can see the DOM gone, but wonder if there are any remnants left over that aren't cleaned up automatically. Should I be trying to clean something up?

25 Sep 2007, 7:06 PM
/:) 8887

please refrain from thread hijacking.

if you need help on this topic, post in Help with a link back to the original post.

25 Sep 2007, 8:24 PM
hi, PFM,you can see this post:


26 Sep 2007, 4:39 AM
sorry mystix... did not recognize it was under bugs.

Thanks fangzhouxing.