Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

Free Ajax allocated memory

more options
I use some sort of "Ajax" style processing to show log records in a
:

var txt = document.createElement('div'); txt.innerHTML = recs[i].slice(2);

There may be MANNY records inserted in that way. This can consume more than 1MB. As soon as user switches to somewhere else in application, FixreFox does not free the used memory. I tried "about:memory" (GC/CC) without success.

Closing FireFox window does not free memory as well - I need to close application.

How can I get FireFox to free memory?

I use some sort of "Ajax" style processing to show log records in a <DIV>: var txt = document.createElement('div'); txt.innerHTML = recs[i].slice(2); There may be MANNY records inserted in that way. This can consume more than 1MB. As soon as user switches to somewhere else in application, FixreFox does not free the used memory. I tried "about:memory" (GC/CC) without success. Closing FireFox window does not free memory as well - I need to close application. How can I get FireFox to free memory?

Змінено syncgw

Усі відповіді (4)

more options

I'm not sure when Firefox destroys the request and response object, but what if you explicitly set it to null once you have extracted all the data. Does that make any difference?

Since this forums focuses on end-user support, you might elicit more responses on a developer-oriented forum.

more options

Thank you for the answer. If you know where to find a Firefox developer forum, it would be great if you can share that piece of information with me.

To be clear: I'm talking about a Firefox internal memory issue.

Please note, I'm not talking about a full Web 2.0 application. As soon as user has seen enough, he/she hits a button to another place in application. Behind all buttons are a tradition <Form><input type="submit" ....="" which="" loads="" a="" new="" html="" page.="" <="" p=""> I tried same with e.g. Chrome and that application frees up memory as "extended"

is replaced by an new web page content. A small amount of memory is still being allocated, but that memory is completely freed up as soon as user close this specific Chrome window.
more options

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.

more options

As soon as user has seen enough, he/she hits a button to another place in application.

That might be the problem. When requests are not allowed to complete fully, Firefox sometimes fails to free the memory associated with that request. (This has been seen with scripts that set src on img tags before the image is fully loaded, and might affects XMLHttpRequest as well.)