Bug Tracker

Ticket #8337 (closed bug: worksforme)

Opened 4 years ago

Last modified 2 years ago

Memory leak in jQuery 1.5 with IE8

Reported by: James Wiseman <jwiseman@…> Owned by: James Wiseman <jwiseman@…>
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5
Keywords: needsreview Cc:
Blocking: Blocked by:

Description

Yes, this again!

I have done quite a bit or reading on this, and have read a number of other tickets that have been raised (not least http://bugs.jquery.com/ticket/8171). In my opinion it warrants another ticket, but apologies if this can be resloved by other means.

The issue occurs when using the jQuery UI 1.8.9. I've rasied the issue against jQuery core as other previous issues seem to have been realted to this.

When refreshing the tabs, a memory leak is observed:

$("#tabContent").tabs("load", $("#tabContent").tabs('option', 'selected'));

I've managed to reproduce this issue in this jsfidde:  http://jsfiddle.net/nxDUN/2/

To view the issue, open task manager, and repeatedly click the 'test' button. For me, the memory started climbing. On occasions it would stop. Waiting 10+ seconds and the restarting clicking showed the same issue.

Doubtful that it might be some leak in JSFiddle, I created a test suite with the same code. I've uploaded it to me site at:  http://www.jameswiseman.com/blog/wp-content/uploads/2011/02/testsuite.zip

Hope this is useful. Feel free to contact me regarding this.

Change History

comment:1 Changed 4 years ago by jitter

  • Owner set to James Wiseman <jwiseman@…>
  • Status changed from new to pending

Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a test case!

There are several issues with your report:

  • your test case uses jQuery UI, instead of jQuery core only
  • I can't reproduce any memory leak with IE8 and your test case
  • IEJSLeaksDetector doesn't show any leaks
  • You are using jQuery 1.8.7 in the test case (1.8.9 in the report)
  • afaik jQuery UI isn't supported with 1.5 (due to a a regresion in 1.5 check #8123. You might want to try the 1.5.1rc1 version which has this bug fixed)

btw. you can try  http://jsfiddle.net/nxDUN/2/show to rule out the possibility of this being a jsfiddle leak.

comment:2 Changed 4 years ago by James Wiseman <jwiseman@…>

  • Status changed from pending to new

Thanks for your quick response.

In response to the issues you raised

  • The test case was really to try to isolate the bones of the problem. Not being sure whether the issue I perceived was in jQuery or jQuery UI, I opted for the most common historical cause of memory leaks. For most of the reproduction, I used to code in the test ZIP, anyway.
  • Strange, because I can, very reliably. Moreover, I'm now seeing it in Crome now as well (I've switched over to 1.5.1rc1, but am not attributing it to this). Captured in the below images:

 http://www.jameswiseman.com/blog/wp-content/uploads/2011/02/chromestart.jpg

 http://www.jameswiseman.com/blog/wp-content/uploads/2011/02/chromend.jpg

All I am doing is frenetically clicking the 'test' button and observing a memory gain. After a short period of time the gain reaches a plateau. After another interval, the clicking brings about another memory gain. The memory doesn’t get released.

  • Thanks for the IEJSLeaksDetector reference - that’s a useful resource that can be absorbed into our development community. Interestingly enough, testing on the code in the zip file in the same way also yields the same memory gain symptoms.
  • JSFiddle doesn’t let you select 1.8.9. I observe the same symptoms with both the fiddle and the test zip, however.
  • As mentioned above, I have switched to 1.5.1r1, and the same issue prevails.

It all seems a bit strange if you ask me. Other developers in our company working on a different app with an independent infrastructure are reporting the same issues. I’ll suggest they add to this report.

comment:3 Changed 4 years ago by jitter

  • Keywords needsreview added

comment:4 Changed 3 years ago by dmethvin

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

We can't repro this.

Note: See TracTickets for help on using tickets.