Subj : Re: Newbie question. GC or memory managment. To : netscape.public.mozilla.jseng From : J.P. Date : Fri Aug 27 2004 12:42 pm In my code, I have multiple threads sharing the same runtime. Each thread has his own contexts. Do I need to compile the JS engine with JS_THREADSAFE defined? Do I need to use JS_BeginRequest and JS_EndRequest to bracket the JS API calls in each thread? Thanks. Brendan Eich wrote: > J.P. wrote: > >> Given a context, I constructed some objects, string by using >> JS_NewStringCopyN(), JS_NewObject() and by evaluating script, such as >> "$$ = new Object()". >> >> I assume that all these storage will be deallocated automatically >> after I destroy the context. Is it right? > > > > No. > > Do you know how Garbage Collection works? It doesn't depend on manual > intervention to release storage. > > /be .