Opened 15 years ago
Closed 15 years ago
#3159 closed bug (fixed)
$(..).empty() leaks memory when form is first child
Reported by: | jeberma | Owned by: | flesler |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Calling $(expr).empty() on an element who's first child is a form fails to uncache/unbind that child's data/events. I think this problem can be attributed to the following method chain:
$.empty -> $.remove -> $.add -> $.makeArray
on line 1135 the filter for array-like parameters should possibly test for form elements, as they also have a length property. It seems like the current implementation creates an array of form fields, excluding the form itself.
Please see the attached file for verification.
Attachments (2)
Change History (5)
Changed 15 years ago by
Attachment: | ticket3159.html added |
---|
comment:1 Changed 15 years ago by
need: | Review → Patch |
---|---|
Owner: | set to flesler |
Status: | new → assigned |
Right, this can be fixed easily.
comment:2 Changed 15 years ago by
need: | Patch → Commit |
---|
Note: See
TracTickets for help on using
tickets.
Demonstrates uncaching issue. Run with Firebug enabled.