Protocol for cleaning up after Velocity (to avoid memory leaks)
See original GitHub issueI’m using Velocity (“V”) in an Aurelia project using the aurelia-animator-velocity plug-in, which, as you may know, is a very, very thin wrapper over V.
Everything works great, except that V doesn’t clean up the DOM nodes involved in animation. I ruled out the wrapper by removing it from my project and loading V in the usual way: a script tag in index.html. I then replaced all calls to this.animator.animate(...)
with Velocity(...)
. Again, everything works perfectly.
But V is still leaking. When I navigate away from a view, Aurelia invokes detached()
, and all DOM nodes that can be removed are removed. The V nodes remain.
With the plugin, I’m invoking V this way:
this.animator.animate(document.getElementById('recoveryFieldSet'), { height: '80px' }, { duration: 100 });
In other words, I’m not using jQuery. What do I need to do the prepare V nodes for removal from the DOM?
Thank you!
Eric
Issue Analytics
- State:
- Created 6 years ago
- Comments:9
@Rycochet thanks for your efforts, it is much appreciated 👍
@zewa666 @estaylorco Just remember that this is related to the develop branch - which is unlikely to be fully released until late December at the earliest.