question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Protocol for cleaning up after Velocity (to avoid memory leaks)

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

3reactions
zewa666commented, Apr 6, 2017

@Rycochet thanks for your efforts, it is much appreciated 👍

0reactions
Rycochetcommented, Nov 23, 2017

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Detect and Prevent Memory Leaks | Scout APM Blog
Read through the application code and look for class attributes that grow in size, arrays that grow but never shrink, and long-lived objects....
Read more >
Java Memory Leaks: Solutions, Tools, Tutorials & More - Stackify
1. Use reference objects to avoid memory leaks · SoftReference object: garbage collector is required to clear all SoftReference objects when ...
Read more >
Debugging Memory Leaks in Node.js Applications - Toptal
Ideally you want to avoid large objects inside of hot functions so that all data is fit into New Space. All CPU and...
Read more >
How to Detect and Avoid Memory Leak in Java - HackerNoon
An in-depth overview of what memory leaks are in Java, how they cause, and workable strategies for preventing them.
Read more >
How to detect iOS memory leaks and retain cycles using ...
A major part of this effort is to prevent, fix and remove any retain cycles and memory leaks in our large codebase. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found