Archive
Why Mozilla Memory Leakage is Not That Bad
Today Anne linked to an article on Mozilla.org: Using XPCOM in JavaScript without leaking. This article explains that, indeed, you can create memory leaks in Mozilla by using closures. However, the leaked memory will be collected after the document is closed (e.g. you load a different page):
(...) neither the element nor any of the properties nor any of the objects reachable from those properties can be freed until the document is no longer displayed.
Basically this means that you won't run into the memory leakage issues IE suffers from. You can optimize your code though to prevent memory leakage for JavaScript objects which are no longer being used. Personally I don't think this is much of a problem, unless you are developing a heavily used web applictaion which will stay open for hours.
This also means that Event Cache cannot be used to optimize memory usage in Mozilla, unless you create specific caches for specific pieces of the code.
Comments
No comments yet.
Leave a Comment
Due to some recent spam, and because this site is no longer active I've decided to disable comments side-wide. You can always mail me if you have questions. Thanks!