-
Notifications
You must be signed in to change notification settings - Fork 9
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
Imported Resources don't provide a finalizer #58
Comments
Seems like a bug, but with wit-bindgen, rather than this tooling, so should be https://github.com/bytecodealliance/wit-bindgen/issues I think |
Okay, never mind, this seems to be intended: bytecodealliance/wit-bindgen@c648fc7 Nevertheless, it might be helpful to mention in the readme that resources must be disposed/dropped manually. Feel free to close this issue if this is not the correct repository for these suggestions. |
You are right, I'd forgotten about the child resources problem. |
The warnings look reasonable to turn on, Do you have an example where this triggers? Not sure the best place to document, but we can certainly add a note the readme here. |
Currently, projections for imported resources implement
IDisposable
, but they do not provide afinalizer
. This means that if the user forgets to manually dispose the resource, its[resource-drop]
function is never called.I believe this is incorrect, and the resource should provide a finalizer that calls the resource's
[resource-drop]
function.Version:
The text was updated successfully, but these errors were encountered: