Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#9471 closed bug (fixed)

memory leak noticed when loading jquey.1.6.1.min.js included html pages in the iframe

Reported by: r_ramasamy@… Owned by: Rick Waldron
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>

Change History (8)

comment:1 Changed 7 years ago by Rick Waldron

Component: unfiledcore
Priority: undecidedlow
Resolution: duplicate
Status: newclosed

comment:2 Changed 7 years ago by Rick Waldron

Duplicate of #4693.

comment:3 Changed 7 years ago by Rick Waldron

Resolution: duplicate
Status: closedreopened

comment:4 Changed 7 years ago by Rick Waldron

Owner: set to Rick Waldron
Priority: lowhigh
Status: reopenedassigned

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

comment:5 in reply to:  4 Changed 7 years ago by r_ramasamy@…

Before entering the ticket, I did use the SIEve and confirmed the memory leak.

Replying to 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

comment:6 Changed 7 years ago by Rick Waldron

Well, awesome! (it wasnt mentioned, but no big deal)

comment:7 Changed 7 years ago by rwldrn

Resolution: fixed
Status: assignedclosed

Landing pull request 401. Nulling all elements created in support.js; Fixes #9471.

More Details:

comment:8 Changed 7 years ago by timmywil

Milestone: 1.next1.6.2
Note: See TracTickets for help on using tickets.