Bug Tracker

Ticket #14544 (closed feature: fixed)

Opened 12 months ago

Last modified 12 months ago

Remove elem reference from event handler

Reported by: dmethvin Owned by: dmethvin
Priority: low Milestone: 2.1
Component: event Version: 1.10.2
Keywords: Cc:
Blocking: Blocked by:

Description

The reference to the element being handled at  https://github.com/jquery/jquery/blob/7f0b28e3083ab8e755801823166e1b008d128242/src/event.js#L80 was there to prevent oldIE leaks so it can be removed in master.

This change will also be useful if we attach data directly to elements, because we may be able to get away with only calling teardown for special events rather than all events on discarded elements.

PR:  https://github.com/jquery/jquery/pull/1400

Change History

comment:1 Changed 12 months ago by dmethvin

  • Status changed from new to assigned
  • Component changed from unfiled to event
  • Priority changed from undecided to low
  • Milestone changed from None to 2.1
  • Owner set to dmethvin
  • Type changed from bug to feature

comment:2 Changed 12 months ago by dmethvin

Ref #11570

comment:3 Changed 12 months ago by Ilya Kantor

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

Event: Fix #14544. Remove elem from event handle, close gh-1400.

This also reduces memory leaks if the element is removed without cleaning events (e.g with native DOM operations).

Not pickable into the 1.x branch because oldIE still needs this.

Changeset: d0782ed7e81a181f0541e1ce7c8cba0825a80299

Note: See TracTickets for help on using tickets.