Massively looks at the best free to play games

JavaScript Memory Leaks

There's been some recent talk about memory leaks* in the JavaScript implementations of the major browsers. Here are three opinions from JavaScript experts:

  • Joel Webber: DHTML Leaks Like a Sieve - the article that started it all. He goes into some detail about why this happens.

  • Peter-Paul Koch of Quirksmode discusses this further: JavaScript Memory Leaks

  • Aaron Boodman (of Greasemonkey fame): DHTML leaks… not so much, actually. Aaron runs some tests and finds little leakage in Firefox, at least resulting from the circular references mentioned in the original article. On the other hand, IE indeed does leak like a sieve.

  • Mark Wubben's Event Cache automatically removes event handlers when a page is unloaded, solving IE's memory leakage problem.

* For those unfamiliar with the term, memory leaks refers to memory that is allocated but never freed. After thousands of operations with a minor leak, a significant amount of memory can be lost, resulting in slowdowns and crashes. This is the sort of thing that you usually don't have to worry about with JavaScript, but if you're writing something complex—like a video game, or a GMail—it becomes a concern.

Reader Comments

(Page 1)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Other Weblogs Inc. Network blogs you might be interested in: