Skip to content

NewInstance memory leak #894

Open
Open

Description

@smx7758258

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions