[Question] Why are the return values of the two functions different?
https://github.com/nodejs/node-addon-examples/blob/ed36ba2d8512d73c7171b9537c96a63bc34e9831/src/1-getting-started/7_factory_wrap/node-addon-api/myobject.cc#L24-L28
https://github.com/nodejs/node-addon-examples/blob/ed36ba2d8512d73c7171b9537c96a63bc34e9831/src/1-getting-started/6_object_wrap/node-addon-api/myobject.cc#L46-L58
I'm Newby, who just got into NAPI.
In the above two codes, methods are create and return the object.
I wonder why only the return value in NewInstance uses escape scope.
The different is that in the first case the creation of the object was done in the context of a scope
Napi::EscapableHandleScope scope(env);
You can read more about scopes in -> https://github.com/nodejs/node-addon-api/blob/main/doc/handle_scope.md#handlescope