Subj : Re: Narrowed the problem down to... To : netscape.public.mozilla.jseng From : "Sterling Bates" Date : Tue Nov 04 2003 11:14 pm "Brendan Eich" wrote in message news:3FA85E39.30102@meer.net... > > That's not good design in general (not saying your particular solution > is bad): object is to thread (context) as fish is to bicycle. An object > might track which runtime contained it in the runtime's GC heap. But > context makes no sense, unless you're very sure you will always have > only one context per runtime. What I understand you saying is that I can create an object independent of any context (cx == nil?), and any script running within the runtime can access the created object. When I execute JS_Finish(FRuntime), that's when the object is freed up. I'll have to read more about the context & runtime objects to get a better understanding of what they do. It was only today that I read the API doc for JS_DefineObject, and saw that cx is passed in case an error is raised. Is that the only reason? Sterling .