Skip to main content

Bug Tracker

Side navigation

#11775 closed bug (invalid)

Opened May 15, 2012 11:52PM UTC

Closed May 30, 2012 08:32AM UTC

Last modified July 29, 2014 02:21PM UTC

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:
Description

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.

Attachments (0)
Change History (5)

Changed May 16, 2012 01:15AM UTC by rwaldron comment:1

resolution: → invalid
status: newclosed

Comment nodes are not supported by data()

Changed May 16, 2012 01:30AM UTC by dmethvin comment:2

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?

Changed May 16, 2012 01:30AM UTC by dmethvin comment:3

owner: → anonymous
status: reopenedpending

Changed May 30, 2012 08:32AM UTC by trac-o-bot comment:4

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!

Changed July 29, 2014 02:21PM UTC by m_gol comment:5

This is not reproducible in jQuery >= 1.9.0 anyway.