JS_DestroyContext 编辑
Destroy a JSContext
.
Syntax
void
JS_DestroyContext(JSContext *cx);
void
JS_DestroyContextNoGC(JSContext *cx);
void
JS_DestroyContextMaybeGC(JSContext *cx); // Obsolete since JSAPI 14
Name | Type | Description |
---|---|---|
cx | JSContext * | The context to destroy. |
Description
These functions destroy a context, cx
. JS_DestroyContext
additionally performs garbage collection to reclaim any memory that was being used by cx
's global object. JS_DestroyContextNoGC
does not perform garbage collection. JS_DestroyContextMaybeGC
may or may not perform garbage collection; the engine makes an educated guess as to whether enough memory would be reclaimed to justify the work.
In a JS_THREADSAFE
build, it does not matter whether the calling thread is in a request on cx
. However, there must not be any suspended requests on cx
.
If JS_SetContextCallback
has been called, this calls the callback.
See Also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论