Skip to content

Release WASM module/shared library when no clients are using it anymore #208

@AndyTitu

Description

@AndyTitu

Current Behavior

For very long running processes, it might be the case that some users might want to reclaim memory consumed by keeping the wasm module/shared library loaded if no SDK clients are in scope anymore.

Currently, once we load the wasm module/shared lib, we keep that loaded for the entire life of the process using the SDK. The size of sdk core loaded in memory is not that big, and this often happens in practice, so it's not a huge problem.

Desired Behavior

Some sort of reference counting mechanism needs to be implemented so if SDK clients go out of scope, the sdk-core is unloaded from memory until a new sdk client needs to be used.

Benefits & Value

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions