node-cpp-modules
node-cpp-modules copied to clipboard
scope.Close() in AsyncAfter
shouldn't we close the scope in AsyncAfter since we also opened one?
scope.Close(Undefined());
I assume you mean return scope.Close(Undefined());
I don't think you need to call scope.Close() unless you want to 'rescue' a handle from destruction from the HandleScope.
In this case, I don't see why you would need to rescue the Undefined handle, it should just be
return Undefined();
// and let scope to clean up whatever handles it likes the undefined handle won't be cleaned up like other handles, as far as I know.... right?