Bug Tracker

Ticket #8545 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

Leak with events in IE

Reported by: olau Owned by:
Priority: high Milestone: 1.8
Component: event Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

The test case in issue 2123 is leaking for me in IE 6, 7 and 8 with jQuery 1.5.1. Here's a version that loops and setTimeouts to make the problem easier to see:

 http://jsfiddle.net/En8Ue/

Just open task manager and watch it grow.

I was going to say that this is only a problem with custom events, but if I change 'pseudoEvent' to 'click', it does in fact still leak, although not as much.

Change History

comment:1 Changed 3 years ago by dmethvin

  • Owner set to dmethvin
  • Priority changed from undecided to high
  • Status changed from new to assigned
  • Component changed from unfiled to event
  • Milestone changed from 1.next to 1.6

I have been able to repro this and am looking at it.

comment:2 Changed 3 years ago by john

  • Priority changed from high to blocker

comment:3 Changed 3 years ago by dmethvin

  • Priority changed from blocker to high
  • Milestone changed from 1.6 to 1.7

This is a horribly frustrating leak! It seems like there is some interaction with jsFiddle that prevents the test case from failing (leaking) unless it is loaded from a clean start. If you simply change the version of jQuery and press Run or reload it won't always start leaking.

That said, I don't think this is a blocker. I can seem to reproduce the behavior consistently all the way back to 1.3.2 in IE8 so if there is a leak it has been going on quite a while.

 http://jsfiddle.net/En8Ue/7/

This test case is an extreme so perhaps in normal cases this leak isn't significant enough to cause problems. I walked through the code and it seems to be releasing things properly, but I'll leave it marked high and we can come back to it later.

comment:4 Changed 3 years ago by anonymous

Can we have a status update on this one?

comment:5 Changed 3 years ago by dmethvin

I've been through the code and can't find the leak. It still seems to be present in 1.7. Ideas welcome.

comment:6 Changed 3 years ago by dmethvin

  • Owner dmethvin deleted
  • Status changed from assigned to open
  • Milestone changed from 1.7 to 1.next

comment:7 Changed 2 years ago by Oleg

  • Status changed from open to closed
  • Resolution set to fixed

Fix #8545. Plug event handling memory leak in oldIE.

Changeset: 203a168980ece60213c87a10ac0ad294783d5563

comment:8 Changed 2 years ago by dmethvin

  • Milestone changed from 1.next to 1.8

comment:9 follow-up: ↓ 10 Changed 2 years ago by anonymous

'change' event handler leaks in IE 7/8:  http://jsfiddle.net/En8Ue/51/

comment:10 in reply to: ↑ 9 ; follow-up: ↓ 11 Changed 2 years ago by anonymous

Replying to anonymous:

'change' event handler leaks in IE 7/8:  http://jsfiddle.net/En8Ue/51/

With the latest version of jquery.

comment:11 in reply to: ↑ 10 Changed 2 years ago by markel

Replying to anonymous:

Replying to anonymous:

'change' event handler leaks in IE 7/8:  http://jsfiddle.net/En8Ue/51/

With the latest version of jquery.

Its very different leak, created ticket for it – http://bugs.jquery.com/ticket/12177

Note: See TracTickets for help on using tickets.