Skip to content

Remove potential leaks when type providers are misauthored #6409

@cartermp

Description

@cartermp

(copied and paraphrased over from @dsyme's PR)

The following mistakes in type provider authoring can result in a memory leak:

  1. If TP instances have mistakenly kept themselves alive by F# compiler not disposing them correctly
  2. If a TP registers itself in global state, e.g. in a callback in a file watch timer or stores itself in global state in its own .dll
  3. if a TP saves one of its generated ProvidedTypeDefinition in a global cache in its own .dll

The compiler should be able to still release these resources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions