Skip to content

Assembly unloading #8852

Closed
Closed

Description

@iSazonov

Summary of the new feature/enhancement

With .Net Core 3.0 release we get new feature - assembly unloading.
This opens the way to full freeing up resources in long-time sessions:

  • when unloading modules
  • (auto) removing unneeded compiled classes and script blocks
  • (auto) removing unneeded types created by means of Add-Type

Proposed technical implementation details

Unload feature requires a complete lack of dependencies and references to this assembly before it can be unloaded. It is necessary to investigate whether it is possible to achieve this in PowerShell Core.

https://github.com/dotnet/coreclr/blob/a7cbc5c8d1bd48cafec48ac50900ff9e96c1485c/Documentation/project-docs/unloadability-howto.md

https://github.com/janvorli/coreclr/blob/f8490b2aae6f5a95b0195e4d5d0d7ad1f654d6f0/Documentation/design-docs/unloadability.md

Activity

  1. added
    Issue-Enhancement
    Issue-Discussion
    on Feb 9, 2019
  2. Jaykul commented on Mar 16, 2019

    @Jaykul
    Contributor

    I'd even vote for auto unloading modules which were auto loaded ...

  3. krokofant commented on May 25, 2021

    @krokofant

    Why was this closed Ilya (@iSazonov) ?

  4. iSazonov commented on May 25, 2021

    @iSazonov
    CollaboratorAuthor

    PowerShell internal design eliminates the possibility of uploading anything.

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

    Issue-DiscussionIssue-Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions