Skip to content

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