|
From: Braden N. M. <br...@en...> - 2001-04-25 19:13:41
|
I'm CC'ing the mailing list in the hope that someone (cmorley?) might be able to provide additional insight. I hope you don't mind. On 25 Apr 2001 19:29:37 +0200, Joerg Scheurich aka MUFTI wrote: > Just for your info: > > The pupil doing debugging of the javascript scrash (example flying pinguin), > found out, there is no crash, when you delete all lines with > > JS_AddRoot > JS_RemoveRoot > > So we tend now to think, this is a sign, the problem is not in the underlying > javascriptengine.... That's encouraging. The JS_AddRoot tells the JS engine that the passed object should be made to persist, and the JS engine's garbage collector will worry about cleaning it up. We want to do this for the JS objects that correspond to the fields declared for the Script node. I'm not clear on why we would need to use JS_RemoveRoot. It looks like a root for an object is added, then removed, in the case where the object is an MF* type and the elements of the array are themselves JS objects. I don't know the underlying reasoning for this distinction, though. Braden |