I'm working with Mozilla v1.7.12 on a constrained device (a Motorola set-top box) trying to resolve some memory leaks.
When I dynamically load a stylesheet which refers to some large images, I can see that the amount of consumed memory increases in correspondance with the size of the images. This is what I would expect.
Then, when I remove the stylesheet from the DOM, I would expect the memory to be freed. However, this does not happen.
This is a problem, because the web application I'm working on needs to be able to dynamically load and and unload stylesheets potentially many times in the lifetime of the page.
My question therefore is this: Is what I'm seeing expected behavior or is it a known bug? Is there a way to work around this?
I should point out that I've set the expires header to -1 on all the images in the stylesheet.
[Update]
If I keep loading and unloading stylesheets, the browser consumes more and more memory. Therfore, it seems not to be the case that the browser reuses the same memory.