Entry: JS_DestroyScript (Function)
Summary: Frees a compiled script when no longer needed.
Syntax:
void) JS_DestroyScript(JSContext *cx, JSScript *script);
Argument Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
script JSScript * Compiled script to destroy.
Description:
JS_DestroyScript destroys the compiled script object, script, thereby freeing the space allocated to it for other purposes. Generally, after you compile a script you do not want to call JS_DestroyScript until you no longer need to use the script. Othewise you will have to recompile the script to use it again.
See also:
|
|
|