Skip to content
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

Auto-drop borrows #72

Open
guybedford opened this issue Nov 16, 2023 · 0 comments
Open

Auto-drop borrows #72

guybedford opened this issue Nov 16, 2023 · 0 comments

Comments

@guybedford
Copy link
Collaborator

guybedford commented Nov 16, 2023

In bytecodealliance/jco#262, we now validate all borrows properly.

The need to call resource[Symbol.dispose]() explicitly for all functions that take resources seems unnecessary though.

Rather, the implementation should always auto-drop borrows at the bindgen level without requiring the JS user to have to do that explicitly. Explicitly drop calls should instead act as early drops if desired.

@guybedford guybedford changed the title Auto-drop borrows, define Symbol.dispose Auto-drop borrows Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant