#3078 closed bug (invalid)
remove() does not remove associated data
Reported by: | jeberma | Owned by: | flesler |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | validate | Cc: | |
Blocked by: | Blocking: |
Description
Removing a validated form element with $('#myForm').remove() does not free the jQuery.cache of the validator instance. Using this chain, $('#myForm').remove().removeData(), does free the cache, however. Please see the attached code.
Attachments (1)
Change History (6)
Changed 15 years ago by
Attachment: | issue3078.html added |
---|
comment:1 Changed 15 years ago by
Component: | core → plugin |
---|---|
Keywords: | validate added |
Owner: | set to joern |
comment:2 Changed 15 years ago by
Component: | plugin → core |
---|---|
Owner: | changed from joern to flesler |
Not plugin related. Maybe remove() should also clean up data via removeData().
comment:3 Changed 15 years ago by
Summary: | [validate] remove does not uncache validator → remove() does not remove associated data |
---|
comment:4 Changed 15 years ago by
The stored data doesn't cause memory leaks per se. Only event handlers. That's the reason it's not cleaned up on remove().
Why should it be removed ? not that this means a big slow down for each removed node (and its descendants).
comment:5 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Considering that the validator instance is stored just in the cache and nowhere else, there isn't a problem the issue of memory leaks. Therefore the overhead of removing data while removing nodes and its descendants isn't worth it.
Please reopen the ticket if you have a scenario where the stale cache actually poses a problem.
a short script that demonstrates the caching issue