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

implement JSArrayBuffer that managed lifecyle of arraybuffer #121

Merged
merged 4 commits into from
Dec 26, 2020

Conversation

sehz
Copy link
Collaborator

@sehz sehz commented Dec 26, 2020

In the previous implementation, Nodejs ArrayBuffer is mapped as &[u8]. This however doesn't allow lifecycle management of Nodejs ArrayBuffer. It is possible that ArrayBuffer can be GC anytime.

In this implementation, JSArrayBuffer manage lifecycle of ArrayBuffer directly. When converting from JS, it creates references to Nodejs ArrayBuffer, preventing GC from occurring. When it is dropped, it removes references allowing GC to occur

@sehz sehz linked an issue Dec 26, 2020 that may be closed by this pull request
@sehz sehz merged commit f1cc913 into infinyon:master Dec 26, 2020
@sehz sehz deleted the js_array_buffer branch December 26, 2020 20:53
@sehz sehz mentioned this pull request Dec 26, 2020
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

Successfully merging this pull request may close these issues.

create JSArrayBuffer
1 participant