Side navigation
#3159 closed bug (fixed)
Opened July 15, 2008 04:40AM UTC
Closed July 15, 2008 03:58PM UTC
$(..).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 (3)
Changed July 15, 2008 03:54PM UTC by comment:1
need: | Review → Patch |
---|---|
owner: | → flesler |
status: | new → assigned |
Changed July 15, 2008 03:55PM UTC by comment:2
need: | Patch → Commit |
---|
Changed July 15, 2008 03:58PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | assigned → closed |
Applied at [5789].
Right, this can be fixed easily.