Skip to content

fix: add calls to extism_function_free to cleanup HostFunctions #14

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

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

zshipko
Copy link
Contributor

@zshipko zshipko commented Oct 26, 2023

It looks like there isn't a good way to define a destructor in Java, so this PR adds a HostFunction.free function that is automatically called when a Plugin is freed, if a HostFunction is never registered with a plugin then it should be called manually.

Fixes #13

@zshipko zshipko changed the title fix: add function to call extism_function_free on HostFunctions fix: add calls to extism_function_free to cleanup HostFunctions Oct 26, 2023
@zshipko zshipko merged commit 5b7d095 into main Oct 30, 2023
@zshipko zshipko deleted the free-functions branch October 30, 2023 18:18
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