JsDisposeRuntime() private method

private JsDisposeRuntime ( JavaScriptRuntime handle ) : JavaScriptErrorCode
handle JavaScriptRuntime
return JavaScriptErrorCode
Ejemplo n.º 1
0
        /// <summary>
        /// Disposes a runtime.
        /// </summary>
        /// <remarks>
        /// Once a runtime has been disposed, all resources owned by it are invalid and cannot be used.
        /// If the runtime is active (i.e. it is set to be current on a particular thread), it cannot
        /// be disposed.
        /// </remarks>
        public void Dispose()
        {
            if (IsValid)
            {
                Native.ThrowIfError(Native.JsDisposeRuntime(this));
            }

            _handle = IntPtr.Zero;
        }