Subj : JS_GC question! To : netscape.public.mozilla.jseng From : "richardl" Date : Thu Dec 11 2003 11:42 am I embedded spidermonkey to a mini-browser. It works but: Having problem when running the following script: After I clicked twice the button, out of memory occured! So I have to put JS_MaybeGC(cx) after each EvaluateScript() call. It helps to gain back the memory, but I found it is not stable any more. It often causes crash in js_FindProperty(JSContext * 0x0126e640, long 19227776, JSObject * * 0x00faf630, JSObject * * 0x00faf62c, JSProperty * * 0x00faf5b0) line 1439 + 33 bytes The statement is if (!OBJ_LOOKUP_PROPERTY(cx, obj, id, &pobj, &prop)) return JS_FALSE; obj is not a valid JSObject structure. It looks like the memory is corrupted. Any idea what is wrong here. Is it safe to do GC in the middle of a page? I used to do clean only when changing web page. Thanks! Richard .