From what I recall of a not too distant past, Javascript interpreters suffered from memory leaking issues when faced with circular references.
Is it still the case in the latest browsers? (e.g. Chrome, FF 3.5 etc)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The vast majority of leaks we talk about with JavaScript are specifically in IE6-7 when you make a reference loop between JavaScript objects and host objects like DOM nodes.
In IE6 this is particularly pernicious in that you don’t get the memory back when you leave the page; it’s gone until you quit the browser. In IE7 clearing out the page does now return the memory, but you can still have difficulty when you have a long-running application. IE8 solves most of this problem properly by turning the DOM nodes into native JavaScript objects instead of host objects. (You could still trigger the leaks in IE8 by including other non-native objects like ActiveX objects in a reference loop.)
There will certainly still be small obscure memory leaks lurking around in random places for all the browsers, especially in older versions. But there’s no one way to easily categorise and avoid them like with the IE refloop issue.