Subj : Re: JS_GC, JS_DestroyContext crash To : "Carlos F." From : Brendan Eich Date : Sun Jan 25 2004 08:35 pm Carlos F. wrote: > Tnaks for the link. I solved the problem of GC following the example, > but I dind't realy undestand how the GC works. > Now I have onother cuestion, if I define properties with > JS_DefineProperty, or if I create object with JS_DefineObject, is > there some procedure to destroy it and release eny resource used by > it, or it is enought to run JS_GC. Or JS_GC only release resouces take > by executed scprits? Garbage collection means you don't call "free" or "destroy" methods for the garbage-collected things, you let the GC recycle them when they become unreachable. Hence roots, global and local, which you must manage so that things stay alive as long as necessary, and no longer. And you should call JS_GC or JS_MaybeGC appropriately. /be .