Subj : Re: Garbage collector To : Patricia Mainguet From : Brendan Eich Date : Thu Feb 06 2003 08:37 am Patricia Mainguet wrote: >Hello, > >Is there any way to know if the garbage collector runs(when the run >time is a bit too small, for example)? > > See the JS_SetGCCallback and JS_SetGCCallbackRT APIs. You should consider running the GC yourself, by calling JS_GC when you know your application has likely created a bunch of garbage (e.g., when a browser window is closed in Mozilla), and calling JS_MaybeGC every so often (say, once every 4096 backward branches, see http://lxr.mozilla.org/mozilla/search?string=MAYBE_GC_BRANCH_COUNT_MASK). /be >Thanks > >Patricia > > .