diff --git a/src/CNodeScriptRuntime.cpp b/src/CNodeScriptRuntime.cpp index 12fb0f20..9a049c3e 100644 --- a/src/CNodeScriptRuntime.cpp +++ b/src/CNodeScriptRuntime.cpp @@ -64,12 +64,18 @@ void CNodeScriptRuntime::OnDispose() } while (uv_loop_alive(uv_default_loop())); }*/ +#ifdef WIN32 + v8::V8::Dispose(); + v8::V8::ShutdownPlatform(); +#else platform->DrainTasks(isolate); platform->CancelPendingDelayedTasks(isolate); platform->UnregisterIsolate(isolate); + isolate->Dispose(); v8::V8::Dispose(); - v8::V8::ShutdownPlatform(); + platform.release(); +#endif //node::FreePlatform(platform.release()); }