Do any web browsers remove garbage items at home? (unlike Javascript objects)

If you made a web application that never refreshed the page, but was completely built from the first page plus Javascript requests, thereby creating and destroying elements as needed, can any of the browsers use the memory used by outdated dom elements?

Is this planned in any browsers?

I think full-blown extJS applications will be very sensitive to such a memory leak.

Is there a really effective reuse strategy to mitigate this problem?

I do not mean the garbage collection of the Javascript object here, only the deleted DOM elements, but I'm not sure if this is ultimately the same at the end.

+5
source share
2 answers

It looks like Chrome is doing this: http://jsfiddle.net/GaPLT/1/ .

Memory usage:

  • Start: 45K
  • After adding: 60K
  • After removal: 49K
+2
source

The short answer depends on your JavaScript engine.

Here's how Chrome V8 does it http://code.google.com/apis/v8/design.html#garb_coll

-1
source

All Articles