Velotio Interview Question

How would you handle memory leaks in JavaScript.