Subj : Re: Does Spidermonkey use a copying garbage collector? To : "J. Wilson" From : Brendan Eich Date : Wed May 21 2003 10:06 am J. Wilson wrote: >I was wondering about the rationale for passing the address of the >pointer to an object to JS_AddRoot() and friends instead of just >the object pointer itself. >Is this because Spidermonkey uses a copying garbage collector? > One reason is to allow for the possibility, but SpiderMonkey has no copying collector yet. Another reason is to allow the root to be first class -- it's a reference, not a particular object, so it may point at various objects (or other things, if it's a jsval) over the lifetime of its registration as a root. /be .