Hi there,

Not sure if I have the right newsgroup, but here goes...I'm trying to embed
some calls to the SpiderMonkey engine from within my app.  And I have a
question about the way the garbage collecting is done.

I embed a custom object in my app by calling JSPropertySpec(),
JSFunctionSpec(), JS_NewObject(), JS_DefineProperties(),
JS_DefineFunctions().  Then, from my script, I use the object.

If my app has a reference to this object, how does the JavaScript runtime
know when to garbage collect this?  I'm a bit confused by this.  I don't see
any API's for incrementing or decrementing the reference count manually.  So
how would the runtime know whether or not I still have a reference to the
object in my app?

Thanks for any help or ideas on this.  And if this is not the correct forum
for this type of question, can someone please point me in the right
direction.  Thanks.

Ed



Reply via email to