Subj : JavaScript memory allocation To : netscape.public.mozilla.jseng From : Michael Vincent van Rantwijk Date : Tue Aug 23 2005 10:11 am Hi all, Let me first introduce myself. My name is Michael Vincent van Rantwijk (son of the MultiZilla author/developer) and I am 13 years old. I've been a junior developer for the MultiZilla project for two months now, and worked in the background for a longer period of time because I had lots, and still do, lots to learn first before going public ;) Now, I'm not sure *if* this is the correct newsgroup for my problem/question but I have some questions about memory allocation in Mozilla (SeaMonkey/Firefox) from without a JavaScript snippet. It is my understanding, but maybe I'm totally wrong in this, that if I use something like this: var someVar = "foobar"; the JavaScript engine allocates a six (6) byte memory block and assigns a pointer to it, right? My first question is: "What happens when I use something like this: someVar = "" / someVar = null; someVar = undefined; ? Will that clear the pointer *and* allocated memory or will there be a trace left of the text "foobar" i.e. is that still 'available' in readable text somewhere in memory? My second question is: if the latter is the true, I guess that setting someVar to = "123456" will overwrite the text "foobar" (right?) but what happens when I set if to a shorter/longer text string? Will that re-use the same allocated memory block, or will it allocate a new block and will that also keep the text "foobar" in memory or will that be cleared? Hey, I'm only 13 years of age, and English is not my native language so excuse me if I asked a blunt question, in the wrong newsgroup? Kind regards, Michael .