We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02d681e commit c580098Copy full SHA for c580098
NativeScript/runtime/ModuleInternal.mm
@@ -422,11 +422,13 @@
422
}
423
424
Local<UnboundScript> unboundScript = script->GetUnboundScript();
425
+ // CachedData returned by this function should be owned by the caller (v8 docs)
426
ScriptCompiler::CachedData* cachedData = ScriptCompiler::CreateCodeCache(unboundScript);
427
428
int length = cachedData->length;
429
std::string cachePath = GetCacheFileName(path + ".cache");
430
tns::WriteBinary(cachePath, cachedData->data, length);
431
+ delete cachedData;
432
433
434
std::string ModuleInternal::GetCacheFileName(const std::string& path) {
0 commit comments