JavaScript-1.5 Reference

JS_NewRuntime Macro

Summary

Initializes the JavaScript runtime.

Syntax

JS_NewRuntime(maxbytes);

Description

JS_NewRuntime initializes the JavaScript runtime environment. Call JS_NewRuntime before making any other API calls. JS_NewRuntime allocates memory for the JSRuntime, and initializes certain internal runtime structures. maxbytes specifies the number of allocated bytes after which garbage collection is run.

Generally speaking, most applications need only one JSRuntime. Each runtime is capable of handling multiple execution threads. You only need multiple runtimes if your application requires completely separate JS engines that cannot share values, objects, and functions.

If JS_NewRuntime is successful, it returns a pointer to the runtime. Otherwise it returns NULL.

See Also

Groups [ Macro ]
Documents [ LXR ID Search ]
Entries [ JS_DestroyRuntime ]

This page was generated by APIDOC