As part of my application, I am compiling a set of small Dom nodes that are not displayed at the same time. I store them in an internal array. The user can call them to display, in which case I return them to the div that is used to display them. This is all good and good. But when it is time to replace everything with new ones, I want to destroy the old ones (actually free them). Otherwise, memory usage may increase exponentially. How to make js browser engine do this? Is it just setting each of the elements in my array of Dom nodes to zero? Is there anything else I should do? Or maybe I don’t have to worry about this at all?
Karim source
share