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

return a disposable string #195

Open
krichprollsch opened this issue Feb 2, 2024 · 0 comments
Open

return a disposable string #195

krichprollsch opened this issue Feb 2, 2024 · 0 comments

Comments

@krichprollsch
Copy link
Member

krichprollsch commented Feb 2, 2024

When the user's API return a not owned []const u8, jsruntime must free the string once v8 copied it.
We must cleary express the two differents strings returned by the user's API:

  • string owned by the user's API must continue to return []const u8. This string must not be free by jsruntime
  • string owned by the caller must return a new jsruntime alias of []const u8. jsruntime must free this string.

Name ideas for the alias: TmpStr,ShortLiveStr, PassingStr, FreeStr, DisposableStr...

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