Subj : Lifespan of Function objects To : netscape.public.mozilla.jseng From : "Stephen Jones" Date : Tue Aug 05 2003 03:26 pm Let's say that I create a JSContext using JS_NewContext and then load a script into that context using JS_EvaluateScript. In that script I set a property on a global object to point to a function that was defined in that script . . . function Test( ) { // body } object.onError = Test; What happens if I destroy the script context and then try to access that function? Is it protected from GC because it's a property of a global object? Does it need to be rooted? Will it always be destroyed when the context is destroyed? Thanks, - Stephen Jones .