/// <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; }