Closed zshipko closed 1 year ago
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.
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!