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 <constructor> are generated(<constructor> name is ClassName) Causing a memory leak
Activity