The Chakra runtime

Each Chakra runtime has its own independent execution engine, JIT compiler, and garbage collected heap. As such, each runtime is completely isolated from other runtimes.

Runtimes can be used on any thread, but only one thread can call into a runtime at any time.

NOTE: A JavaScriptRuntime, unlike other objects in the Chakra hosting API, is not garbage collected since it contains the garbage collected heap itself. A runtime will continue to exist until Dispose is called.

コード例 #1
0
		internal static extern JsErrorCode JsCreateContext(JsRuntime runtime, out JsContext newContext);
コード例 #2
0
		internal static extern JsErrorCode JsGetRuntime(JsContext context, out JsRuntime runtime);
コード例 #3
0
		internal static extern JsErrorCode JsSetRuntimeMemoryAllocationCallback(JsRuntime runtime,
			IntPtr callbackState, JsMemoryAllocationCallback allocationCallback);
コード例 #4
0
		internal static extern JsErrorCode JsSetRuntimeBeforeCollectCallback(JsRuntime runtime, IntPtr callbackState,
			JsBeforeCollectCallback beforeCollectCallback);
コード例 #5
0
		internal static extern JsErrorCode JsEnableRuntimeExecution(JsRuntime runtime);
コード例 #6
0
		internal static extern JsErrorCode JsIsRuntimeExecutionDisabled(JsRuntime runtime, out bool isDisabled);
コード例 #7
0
		internal static extern JsErrorCode JsSetRuntimeMemoryLimit(JsRuntime runtime, UIntPtr memoryLimit);
コード例 #8
0
		internal static extern JsErrorCode JsGetRuntimeMemoryUsage(JsRuntime runtime, out UIntPtr memoryUsage);
コード例 #9
0
		internal static extern JsErrorCode JsDisposeRuntime(JsRuntime handle);
コード例 #10
0
		internal static extern JsErrorCode JsCollectGarbage(JsRuntime handle);
コード例 #11
0
		internal static extern JsErrorCode JsCreateRuntime(JsRuntimeAttributes attributes,
			JsThreadServiceCallback threadService, out JsRuntime runtime);