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

Free temporary slices #142

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Free temporary slices #142

merged 1 commit into from
Nov 24, 2023

Conversation

francisbouvier
Copy link
Member

@francisbouvier francisbouvier commented Nov 24, 2023

This a breaking change.
Before slices (strings) where kept in heap and the API functions didn't have to worry about that.
Now those slices are freed after the function call, so the API functions needs to allocate (ie. copy) those slices if they want them to stay in memory.

Closes #111

This a breaking change.
Before slices (strings) where kept in heap and the API functions
didn't have to worry about that.
Now those slices are freed after the function call, so the API
functions needs to allocate (ie. copy) those slices if they
want them to stay in memory.

Signed-off-by: Francis Bouvier <[email protected]>
Copy link
Member

@krichprollsch krichprollsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I don't check if a deinit has been set isn't it?

@francisbouvier francisbouvier merged commit c601902 into main Nov 24, 2023
3 checks passed
@francisbouvier francisbouvier deleted the free_js_slices branch November 24, 2023 16:01
francisbouvier added a commit that referenced this pull request Nov 26, 2023
Relates to #111
Fix #142

Signed-off-by: Francis Bouvier <[email protected]>
francisbouvier added a commit to lightpanda-io/browser that referenced this pull request Nov 26, 2023
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.

Free JS slices arguments after use?
2 participants