Some of them may be browser dependent, but on the whole I would say that yes, it is really “bad” not to clear old elements. Regardless of whether the element is visible, it still adds node to the DOM structure, and you cannot add to the DOM indefinitely.
If perhaps the browser does not use some kind of intelligent cropping algorithm that collapses the unused / invisible parts of the DOM, but I have never heard that this is done in practice.
source
share