Subj : Re: GC questions To : netscape.public.mozilla.jseng From : "Brad" Date : Thu Jun 19 2003 11:29 am Brendan, thanks for the quick response! I will use Suspend/Resume since these do performe blocking operations. Something like: myCFnx { ... make copies of argv[] params... JS_SuspendContext() ... call blocking C code using copies of params JS_ResumeContext ... assign an appropriate rval } > But if, as one would hope, CString's constructor does copy into a > separately allocated buffer that lives as long as the CString instance > lives, then you might simplify your code further using > JS_ConvertArguments -- this pays off especially if you have several > arguments to convert. The CString constructor is allocating a separate buffer. I didn't know about JS_ConvertArguments. .