n

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!


Navigate


Colophon

Hey! I'd like you to know that this site will be gone soon. Problems with this site (which never was intented as a final release, but has been active for some months already now) will not be solved, sorry for any inconvenience.

The future address of the new site will be http://novemberborn.net/

Summary

Oops, there is no summary.

Context


Misc.

Copyright 2003 - 2004 Mark Wubben. This website is licensed under a Creative Commons License. Powered by WordPress