ジャンプ先:

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!
この記事を English (US) で読むこともできます。

Obsolete since JSAPI 8
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Free a compiled script that is no longer needed.

Syntax

void
JS_DestroyScript(JSContext *cx, JSScript *script);
Name Type Description
cx JSContext * The context in which to destroy the script. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext.
script JSScript * The script to destroy.

Description

JS_DestroyScript destroys the given compiled script, freeing the memory allocated to it. The script must not be currently executing (in any context, at any level of the stack) and must not be used again afterwards.

At present, this function has no effect; the JSScript lives for as long as its script object lives. See JS_NewScriptObject for details.

See Also

ドキュメントのタグと貢献者

このページの貢献者: mdnwebdocs-bot, arai, fscholz, tschneidereit, Jimb, Jorend, Dria, MMondor
最終更新者: mdnwebdocs-bot,