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: call extism_function_free for functions created with extism_function_new #14

Closed
wants to merge 1 commit into from

Conversation

zshipko
Copy link
Contributor

@zshipko zshipko commented Oct 26, 2023

Fixes #12

Adds calls to free functions associated with a plugin when the plugin gets cleaned up, or if plugin initialization fails.

Not sure if this is the most idiomatic way to handle this, so if there's a better way to do this let me know!

@zshipko
Copy link
Contributor Author

zshipko commented Oct 26, 2023

Actually, I'm don't think this is the right solution after looking at the code a little more. It seems like a Extism::HostEnvironment could be used to make multiple plugins so the functions need to be freed when the Extism::Function or Extism::HostEnvironment get garbage collected.

@zshipko zshipko closed this Oct 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.

Functions created with extism_function_new should be freed using extism_function_free
1 participant