Skip to content

C# ResourceTable never frees entries #2056

Done

Description

@ludfjig

ResourceTable<T> in Runtime.cs adds an entry for every Give and Lend. Take and the end of a call set the entry's value to null but never remove the entry. A long-lived sandbox that passes resources across calls therefore grows by one entry per transfer, without limit.

Storing entries in a dictionary keyed by an increasing counter, and removing them on Take and at the end of a call, bounds the table to live entries. Handles are still never reused.

Activity

  1. added
    S-needs-triage
    on Nov 13, 2026
  2. added
    C-bug
    on Nov 16, 2026
  3. added a commit that references this issue on Nov 25, 2026
    c46735c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugS-needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions