#include "v8/include/v8.h"#include "v8/include/libplatform/libplatform.h"
int main(int argc, char* argv[]) { v8::V8::InitializeICUDefaultLocation(V8_LIB_FULL_PATH); v8::V8::InitializeExternalStartupData(V8_LIB_FULL_PATH); std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform(); v8::V8::InitializePlatform(platform.get()); v8::V8::Initialize(); for (auto i = 0; i < 1000000000; ++i) { v8::Isolate::CreateParams create_params; create_params.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); v8::Isolate* isolate = v8::Isolate::New(create_params); isolate->Dispose(); delete create_params.array_buffer_allocator; } v8::V8::Dispose(); v8::V8::ShutdownPlatform();}
is_debug = falsetarget_cpu = "x64"use_drfuzz = falseuse_libfuzzer = falsev8_enable_test_features = ""v8_experimental_extra_library_files = []v8_extra_library_files = []symbol_level = 1is_component_build = falseuse_sysroot = falseuse_glib = falseuse_custom_libcxx = falseuse_custom_libcxx_for_host = falsev8_enable_i18n_support = falseicu_use_data_file = falsev8_static_library = truev8_enable_gdbjit = false
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
int main(int argc, char* argv[])
{
// V8 version 7.1.302.33
v8::V8::InitializeICUDefaultLocation(argv[0]);
v8::V8::InitializeExternalStartupData(argv[0]);
std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform();
v8::V8::InitializePlatform(platform.get());
v8::V8::Initialize();
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
v8::Isolate* pIsolate = v8::Isolate::New(create_params); // If I remove this line and the next one, memory leak disappears
pIsolate->Dispose();
v8::V8::Dispose();
v8::V8::ShutdownPlatform();
delete create_params.array_buffer_allocator;
}