Ticket #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: | ||
| Blocking: | Blocked by: |
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.
Change History
comment:1 Changed 12 months ago by rwaldron
- Status changed from new to closed
- Resolution set to invalid
comment:2 Changed 12 months ago by dmethvin
- Status changed from closed to reopened
- Resolution invalid deleted
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 12 months ago by dmethvin
- Owner set to anonymous
- Status changed from reopened to pending
comment:4 Changed 12 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
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!
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Comment nodes are not supported by data()