Subj : Re: GC Question To : MA From : Brendan Eich Date : Mon May 24 2004 11:48 am MA wrote: > So can any body clarify the situation? Is vp already rooted or not? It's not. http://www.mozilla.org/js/spidermonkey/gctips.html says what the local roots are, and vp is not among them. > And if > it is not rooted, will it be rooted as soon as my function returns, > (because I am storing a new object I create in *vp and the object needs to be > rooted.)? Yes, it will be rooted after the getter returns. Did you really nest a GC within code that followed array = JS_NewArrayObject(cx, 0, NULL); *vp = OBJECT_TO_JSVAL(array); or did the GC run on another thread? If so, the native function containing the excerpt cited above must have suspended its request (are you using JS_BeginRequest, etc., if you define JS_THREADSAFE?). /be .