aurelia / validation

A validation plugin for Aurelia.
MIT License
132 stars 129 forks source link

Investigate memory usage (destroy) #11

Closed janvanderhaegen closed 8 years ago

janvanderhaegen commented 9 years ago

Since aurelia/validation depends on observers, there should be a proper way to clean up (destroy) a validation when it is no longer needed.

jadrake75 commented 9 years ago

I was just thinking the same thing. I am new to aurelia-validation, but If you create the validator against a bound model ideally there should be a .off( ) or .destroy( ) you can call on detach of a component. I do this for model observers and event subscribers in view-models

maxgrv commented 9 years ago

This is pretty serious, and makes the plugin unusable if you use some properties with dirty checking. Any updates or workarounds?

maxgrv commented 9 years ago

I see that commit https://github.com/aurelia/validation/commit/2187489aae24c4b714addb2d1d29e4b81c649b6f addresses this bug. Just to note, shouldn't the dependency subscriptions be cleared as well?

plwalters commented 8 years ago

Thanks for submitting this / commenting on this. At this time we are closing this because we have completely re-written and are deprecating the previous feature set. If you feel this should be re-opened please feel free to review this blog post and submit either again on this repository, or on the new validatejs bridge repository

Thanks again!