javascript - Spidermonkey: How do I delete the global object -


i can create global objects with

js_newcompartmentandglobalobject 

(sm 1.8.5) or similar function

but how delete global object. far know global object rooted , no gc thing. @ end can call js_destroycontext call js_gc must have context. when global object garbage collected?

the js_destroycontext call garbage collection reclaim memory used context's global. presumably should set js::rooted jsval_null before destroying context there no stack roots of global when gc runs.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -

Save and close a word document by giving a name in R -