-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a new Closure #508
Comments
Hi @thai6070 , The |
In simple words, I assume that the core problem here is that handles can't outlive the execution time of the invoked c++ handler. |
@thai6070 Hmmm ... we don't actually have a way of creating a weak reference with a callback. |
This allows one to tie the life cycle of one JavaScript object to another. In effect, this allows for JavaScript-style closures. Re: nodejs#508
This allows one to tie the life cycle of one JavaScript object to another. In effect, this allows for JavaScript-style closures. Fixes: nodejs#508
This allows one to tie the life cycle of one JavaScript object to another. In effect, this allows for JavaScript-style closures. Fixes: nodejs/node-addon-api#508 PR_URL: nodejs/node-addon-api#551 Reviewed-By: Kevin Eady <[email protected]>
This allows one to tie the life cycle of one JavaScript object to another. In effect, this allows for JavaScript-style closures. Fixes: nodejs/node-addon-api#508 PR_URL: nodejs/node-addon-api#551 Reviewed-By: Kevin Eady <[email protected]>
This allows one to tie the life cycle of one JavaScript object to another. In effect, this allows for JavaScript-style closures. Fixes: nodejs/node-addon-api#508 PR_URL: nodejs/node-addon-api#551 Reviewed-By: Kevin Eady <[email protected]>
This allows one to tie the life cycle of one JavaScript object to another. In effect, this allows for JavaScript-style closures. Fixes: nodejs/node-addon-api#508 PR_URL: nodejs/node-addon-api#551 Reviewed-By: Kevin Eady <[email protected]>
I want to create a decorator like this by Js
And my C++ code
With scalar types, I convert them to C++ types, so there's no problem. How about other types like object, function and array? I found the void* data argument can be passed to Funtion::New, but I didn't see any example.
The text was updated successfully, but these errors were encountered: