We have a dashboard system for stats at my work and each dashboard is in an iframe (due to legacy support). So each time a person using our system wants to look at their stats, the iframe is refreshed and it loads up many Ext.grids and Flash charts all arranged in many patterns. We wanted to slowly cut over our charting system to Ext4, with the older grids still remaining on Ext3 for a time. Right after the initial release of including the Ext4 sandbox library in our dashboard system, we started getting many out of memory errors. After some time tracking down the source we created a simple scenario which can consistently cause a large memory leak.
outer.html - this contains the iframe which loads the other page
var run = false;
document.getElementById("myiframe").src = "inner.html";
<iframe id="myiframe" width="640" height="480"></iframe><br/>
<input type="button" value="Start" onclick="run = true; reloadIframe();"/>
<input type="button" value="Stop" onclick="run = false;"/>
We can't figure out why this is causing a memory leak, we have tried many methods of destroying the iframe and the objects within. I'm wondering if anyone else can provide insight into this memory leak.
Our environment includes:
Client + Server (doesn't leak if done locally)
Tested IE9 and Firefox current (does not leak in chrome)
And the memory leak doesn't cause an out of memory right away. Having task manager open in windows you can see the memory consumption go up by like 20mb with each refresh of the inner iframe.