Subj : Re: JS_GetArrayLength() crashing (garbage collection issue) To : sebastien maraux From : Brendan Eich Date : Thu Feb 24 2005 04:35 pm sebastien maraux wrote: > JS_AddRoot(pJSContext, pDataHolder->pChildrenArray); You need to pass &pDataHolder->pChildrenArray -- see the API docs and many other postings (google groups is useful to find these) on this. You should also compile with DEBUG defined, in which case you should be seeint JS_ASSERTs about roots pointing outside the GC heap, etc. /be .