Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewInstance memory leak #894

Open
smx7758258 opened this issue Jul 18, 2020 · 0 comments
Open

NewInstance memory leak #894

smx7758258 opened this issue Jul 18, 2020 · 0 comments

Comments

@smx7758258
Copy link

smx7758258 commented Jul 18, 2020

Nan::HandleScope scope;
Local FunctionTemplate tp = Nan::New(New);
tp->SetClassName(Nan::New(ClassName).ToLocalChecked());
tp->InstanceTemplate()->SetInternalFieldCount(1);
Local Function cons = tp->GetFunction();
Local Object js;
js= Nan::NewInstance(cons, argc, argv).ToLocalChecked();
args.GetReturnValue().Set(js);

Using this method, two are generated( name is ClassName)
Causing a memory leak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant