Subj : gc questions (and various questions also) To : netscape.public.mozilla.jseng From : Brann Joly Date : Wed May 12 2004 09:06 pm the JS_CompileFunction has a Jsobject * param, described like this : "Object with which the function is associated." I assume it isn't the "this" object, because this one is specified in Js_CallFunction, so what is this association? Is it just a GC thing (so that my function object will not be garbage collected, because it is attached to the global object for instance), or am i missing someting (i guess i am) Also, I'm wondering what's the difference between Js_DefineObject and Js_NewObject. let's say A is a JsObject with a property named "a", which is a jsObject (i mean which should return an object when u access A.a) . What's the difference between defining the object as a property of A with DefineProperty, and creating one, since my getter will be called in both case, and will have to return the object. Again, is it just GC related or is it deeper than that? I wonder if I understand correctly the concept of property. In my model, only one object is created and set as a root (this object is the Document element of a Dom tree), and when a user wants to access a property of this object, my getter is called, creates the object if it doesnt exist in javascript yet, and return the adress of this object. Is it the normal way to go? Since some of my Dom objects are containing attributes of types not supported by javascript (Vector for example), how should i do? I thought that i could create an object with 3 properties (x, y, z) and a private tag to my vector in dom, with a specialized getter returning the ints to spidermonkey if the user tries to access x, y or z . Is it a good idea, or is there a better way to do that? Thanks :) Brann .