bytecodealliance / bytecodealliance/componentize-dotnet

Imported Resources don't provide a finalizer

Open
#58 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
147
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Currently, projections for imported resources implement `IDisposable`, but they do not provide a `finalizer`. 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:
````xml

````

Contributor guide

Open the contributing guide

Research direction

Start by locating the generated projections for imported resources and the IDisposable implementation described in the issue. Trace how the resource's [resource-drop] function is handled, then verify that an undisposed projection invokes it through a finalizer; the issue provides no file or test entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, wasm
Domain
backend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.