nan icon indicating copy to clipboard operation
nan copied to clipboard

NewInstance memory leak

Open smx7758258 opened this issue 5 years ago • 0 comments

Nan::HandleScope scope; Local FunctionTemplate tp = Nan::New<FunctionTemplate>(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

smx7758258 avatar Jul 18 '20 15:07 smx7758258