Bug Tracker

Ticket #10137 (closed bug: worksforme)

Opened 3 years ago

Last modified 2 years ago

jQuery 1.6.2 leaks memory in support.js, when used inside iframe's

Reported by: mmaass@… Owned by: rwaldron
Priority: undecided Milestone: None
Component: support Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

Hi, it looks like support.js is leaking memory, when jQuery is included inside an iframe. I've searched the bug tracker and found this ticket http://bugs.jquery.com/ticket/9471, but the problem still exists in 1.6.2.

I've used sIEve-0.0.8 with this test case:

outer.html:

<!doctype html>
<html>
    <head>
        <title></title>
    </head>
    <body>      
        <iframe id="container" width="1024px" height="768px" src="inner1.html" />
    </body>
</html>

inner1.html:

<!DOCTYPE html>
<html>
	<head>
		<title>Page1</title>
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.jss"></script>
	</head>
	<body>
		<a href="inner2.html">goto page2</a>	
	</body>
</html>

inner2.html:

<!DOCTYPE html>
<html>
	<head>
		<title>Page2</title>
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.js"></script>
	</head>
	<body>
		<a href="inner1.html">goto page1</a>	
	</body>
</html>

To reproduce the leak you need to click "goto page2" and then "goto page1". Just clicking "goto page2" won't be enough.

I've uploaded an screenshot  http://imageshack.us/photo/my-images/38/sieve.png/ of SIEve's "Detected DOM Leaks and Cycles" page.

Change History

comment:1 Changed 3 years ago by mmaass@…

I've forgot to mention browser and os version. The leak affects IE7 (7.0.5730.13) on Windows XP Professional SP3. It's Microsoft's standard IE7 image for VirtualPC.

comment:2 Changed 3 years ago by rwaldron

  • Owner set to rwaldron
  • Status changed from new to assigned
  • Component changed from unfiled to support

comment:3 Changed 3 years ago by mmaass@…

My second snipet contains a bug. I've mistyped the file extension. The leak is still there but you don't need to navigate twice.

comment:4 Changed 3 years ago by lpahwa <lpahwa@…>

Is this being addressed in the next JQUERY release or Patch?

comment:5 Changed 3 years ago by anonymous

Dear sir or madam,

My team is programming a system which is based on jquery1.5.2, but now we got a very serious problem which is bug #10137(http://bugs.jquery.com/ticket/10137) on IE9 (we used dtd of xhtml1.0, but we think it's not much bearing on this problem).

This problem is so serious that will impact the performance of our system on IE9. Because of the day of product release is very close, we don't want to solve the problem by updating to 1.7.2. Could you tell us which parts were modified? Cause we want to solve this problem on jquery1.5.2 if we can. However, if the parts have to be modified are too much that we have to update to 1.7.2, could you tell us if there are any other changes or parts that might cause some bugs, which are not listed on the Relese Notes?

comment:6 Changed 3 years ago by sindresorhus

Here's the comparison of 1.5.2 and 1.7.2. Enjoy! ;)

You can see what's been modified:  https://github.com/jquery/jquery/compare/a507f719ab...754bda21cb

comment:7 Changed 3 years ago by dmethvin

Also, the ticket in #9471 has a link to the changeset, it is relatively small and should be easy to add if that is the cause of the problem.

comment:8 Changed 2 years ago by dmethvin

  • Status changed from assigned to closed
  • Resolution set to worksforme

I am not seeing this problem in 1.8b1, we have landed several fixes for memory leaks in the meantime.

Note: See TracTickets for help on using tickets.