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 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -