Side navigation
#9471 closed bug (fixed)
Opened May 31, 2011 08:49PM UTC
Closed June 07, 2011 03:55AM UTC
Last modified March 08, 2012 09:49PM UTC
memory leak noticed when loading jquey.1.6.1.min.js included html pages in the iframe
Reported by: | r_ramasamy@servicespan.net | Owned by: | rwaldron |
---|---|---|---|
Priority: | high | Milestone: | 1.6.2 |
Component: | core | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have test-iframe.html that has link to test-page1.html and test-page2.html. Test pages includes jquery.1.6.1.min.js. The html files are shown below. when tried for every load, I can see 800kb to 1MB memory leak that keeps adding up and memory usage is constantly growing. IE7 and IE8 were used to test this.
test-iframe.html
<html>
<body>
<iframe src="/test-page1.htm" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
test-page1.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Select work</title>
<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
</head>
<body style="overflow:hidden;margin: 0px; padding: 0px;" >
<br/>
<br/>
<br/>
<br/>
<br/>
<a href="test-page2.htm">page2</a>
</body>
</html>
test-page2.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Select work</title>
<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
</head>
<body style="overflow:hidden;margin: 0px; padding: 0px;" >
<br/>
<br/>
<br/>
<br/>
<br/>
<a href="test-page1.htm"> page1 </a>
</body>
</html>
Attachments (0)
Change History (8)
Changed May 31, 2011 09:09PM UTC by comment:1
component: | unfiled → core |
---|---|
priority: | undecided → low |
resolution: | → duplicate |
status: | new → closed |
Changed May 31, 2011 09:56PM UTC by comment:3
resolution: | duplicate |
---|---|
status: | closed → reopened |
Changed May 31, 2011 10:04PM UTC by comment:4
owner: | → rwaldron |
---|---|
priority: | low → high |
status: | reopened → assigned |
I've noticed a swell in memory leak tickets all related to the same issue so I decided to give this a deeper more thorough look. I rebuilt the test case and ran it through sIEve and I can confirm the leak when using iframes. Every time an iframe is loaded with jQuery, more orphaned elements are introduced by the support module.
Nulling all of the references in support caps the memory leak. The only way I was able to confirm this was by running sIEve again and observing that no unexpected orphan elements were being reported.
Changed June 01, 2011 01:36PM UTC by comment:5
Before entering the ticket, I did use the SIEve and confirmed the memory leak.
Replying to [comment:4 rwaldron]:
I've noticed a swell in memory leak tickets all related to the same issue so I decided to give this a deeper more thorough look. I rebuilt the test case and ran it through sIEve and I can confirm the leak when using iframes. Every time an iframe is loaded with jQuery, more orphaned elements are introduced by the support module. Nulling all of the references in support caps the memory leak. The only way I was able to confirm this was by running sIEve again and observing that no unexpected orphan elements were being reported. https://github.com/jquery/jquery/pull/401
Changed June 01, 2011 03:12PM UTC by comment:6
Well, awesome! (it wasnt mentioned, but no big deal)
Changed June 07, 2011 03:55AM UTC by comment:7
resolution: | → fixed |
---|---|
status: | assigned → closed |
Landing pull request 401. Nulling all elements created in support.js; Fixes #9471.
More Details:
Changeset: 6490c10c751af6ad8cd119526db227939cdcffe9
Changed June 07, 2011 08:44PM UTC by comment:8
milestone: | 1.next → 1.6.2 |
---|