Subj : Re: GC question To : netscape.public.mozilla.jseng From : sukhisoul Date : Thu May 27 2004 07:19 am > > Why? is the JS_MaybeGC never be called? Why the created AppObj and its > properties is not freed when I JS_RemoveRoot()? > what is wrong ? > All the objects you create are global objects. According to my understanding, global objects are never GC'ed. So, you need to manually free them, not rely on GC to do that. Secondly, you are passing a pointer to an object when calling JS_AddRoot. This is wrong. Pass a "pointer to object-pointer" when calling JS_AddRoot. This, of course, has nothing to do with your problem. MA .