Subj : Re: JS_GC behaviour changed in rc5 ??? To : netscape.public.mozilla.jseng From : "Franky Braem" Date : Mon Feb 03 2003 08:38 pm "Shanti Rao" wrote in message news:b1kr5a$ki71@ripley.netscape.com... > Franky, > > > > I've discovered memory leaks from JS_GetStringBytes() (Bug 191675) and > JS_CompileScript(), around 64 bytes per call. It may be the atom table not > being freed, not the strings themselves. Perhaps if I used the UC functions > (do you?) instead, this wouldn't be a problem. > > The leaks are also there with my rc3 builds. But I've always been using JS_GC > before JS_DestroyContext. > Yes I use JS_GetStringBytes alot. I never placed JS_GC before JS_DestroyContext, because normally it calls GC automatically. It seems that calling JS_GC before JS_DestroyContext is a good workaround for this bug. > > Franky Braem wrote: > > > > > > Hi, > > > > Last week I changed from rc4 to rc5. Today I found out that some of my > > scripts create memory leaks. When I call JS_GC before JS_DestroyContext, the > > memory leaks are gone. To be sure that my code wasn't changed, I've > > reinstalled rc4, removed the JS_GC and ran the application again: no memory > > leaks. > > > > So my question is: is the behaviour of JS_GC or JS_DestroyContext changed? > > > > Franky. > > > > > > > .