Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#11775 closed bug (invalid)

Memory leak in .data()

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


Reproduce: http://jsfiddle.net/uTDww/

The code which checks wether an element can accept expando and the one which cleans up expando is different. The cleanup code accepts nodeType==1 only where as accept is more lenient.

The example demonstrates adding expando to comment and then removing comment causing a leak.

Change History (5)

comment:1 Changed 11 years ago by Rick Waldron

Resolution: invalid
Status: newclosed

Comment nodes are not supported by data()

comment:2 Changed 11 years ago by dmethvin

Resolution: invalid
Status: closedreopened

I think that's his point though, $.data is roach-moteling the data. It can be attached but it can't be detached.

How did you run into this problem?

comment:3 Changed 11 years ago by dmethvin

Owner: set to anonymous
Status: reopenedpending

comment:4 Changed 11 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:5 Changed 9 years ago by m_gol

This is not reproducible in jQuery >= 1.9.0 anyway.

Note: See TracTickets for help on using tickets.