Side navigation
#3078 closed bug (invalid)
Opened June 24, 2008 04:58AM UTC
Closed July 28, 2008 05:37PM UTC
Last modified March 14, 2012 08:59PM UTC
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 (5)
Changed July 01, 2008 03:22AM UTC by comment:1
component: | core → plugin |
---|---|
keywords: | → validate |
owner: | → joern |
Changed July 13, 2008 12:50PM UTC by comment:2
component: | plugin → core |
---|---|
owner: | joern → flesler |
Not plugin related. Maybe remove() should also clean up data via removeData().
Changed July 13, 2008 12:51PM UTC by comment:3
summary: | [validate] remove does not uncache validator → remove() does not remove associated data |
---|
Changed July 13, 2008 05:57PM UTC by comment:4
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).
Changed July 28, 2008 05:37PM UTC by comment:5
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.