Adding jquery in iframe causes memory leak when that iframe is reloaded.
I have an iframe which has the jquery 1.5.2.
If I reload the iframe it will cause a memory leak.
Here is the code:
parent.html
- <html>
- <body>
- <iframe id='ifrm' src='http://localhost:8080/acrm/child.html'></iframe>
- <input type='button' value='RELOAD IFRAME' onclick='document.getElementById("ifrm").contentWindow.location.reload(true);'/>
- </body>
- </html>
child.html
- <html>
- <head>
- <script type='text/javascript' src="jscript/jquery-1.5.2.min.js"></script>
- </head>
- <body>
- <div>This is the iframe</div>
- </body>
- </html>
When the iframe is reloaded many times you will see the memory grow. I've tested this with IE 8
Any solutions to this?
Thanks!