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

fix: Memory leak when marshalling C strings parameters #127

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

darind
Copy link
Collaborator

@darind darind commented Sep 2, 2021

This PR addresses a memory leak when marshalling C string parameters. When a JS string needs to be passed to a native function as a C string parameter, we externalise the backing pointer from the V8 heap to ensure a pinned memory location.

The underlying buffer will be disposed when the corresponding JS value is GCed

@darind darind self-assigned this Sep 2, 2021
@cla-bot cla-bot bot added the cla: yes label Sep 2, 2021
@rigor789 rigor789 merged commit f946828 into master Sep 2, 2021
@NathanaelA

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants