Memory leak in Mozilla when unloading stylesheets

Posted by KaptajnKold on Stack Overflow See other posts from Stack Overflow or by KaptajnKold
Published on 2010-05-03T08:41:21Z Indexed on 2010/05/03 8:48 UTC
Read the original article Hit count: 152

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about memory-leaks

Related posts about browser