From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../jsapi_reference/js_destroycontext/index.html | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_destroycontext/index.html (limited to 'files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_destroycontext') diff --git a/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_destroycontext/index.html b/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_destroycontext/index.html new file mode 100644 index 0000000000..be77b35a40 --- /dev/null +++ b/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_destroycontext/index.html @@ -0,0 +1,55 @@ +--- +title: JS DestroyContext +slug: Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_DestroyContext +tags: + - JSAPI Reference + - SpiderMonkey +translation_of: Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_DestroyContext +--- +

+ + +

+ + +

+ +

JSContextを解放します。

+ +

構文

+ +
void JS_DestroyContext(JSContext *cx);
+
+void JS_DestroyContextNoGC(JSContext *cx);
+
+void JS_DestroyContextMaybeGC(JSContext *cx);
+
+ + + + + + + + + + + + + + +
NameTypeDescription
cxJSContext *解放するコンテキスト
+ +

解説

+ +

これらの関数はコンテキストcxを解放します。それに加え、JS_DestroyContextは実行し、cxグローバルオブジェクトが利用したメモリを回収するためにガベージコレクションを実行します。JS_DestroyContextNoGCはガベージコレクションを実行しません。JS_DestroyContextMaybeGCでは、JavaScriptエンジンが十分なメモリ領域を解放できる可能性を判断し、ガベージコレクションを実行するか否かを判断します。 These functions destroy a context, <code>cx</code>. <code>JS_DestroyContext</code> additionally performs garbage collection to reclaim any memory that was being used by <code>cx</code>'s global object. <code>JS_DestroyContextNoGC</code> does not perform garbage collection. <code>JS_DestroyContextMaybeGC</code> 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.

+ +

JS_THREADSAFEを有効にしたビルドでは、cxのrequest内でこの関数を呼ばないでください。

+ +

JS_SetContextCallbackが以前に実行された場合は、そこで設定したコールバック関数が実行されます。 In a <code>JS_THREADSAFE</code> build, the caller must '''not''' be in a request on <code>cx</code>. If <code>JS_SetContextCallback</code> has been called, this calls the callback.

+ +

{{ LXRSearch("ident", "i", "JS_DestroyContext") }}

+ +

{{ languages( { "en": "en/JS_DestroyContext" } ) }}

-- cgit v1.2.3-54-g00ecf