dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.61k stars 10.06k forks source link

AssemblyLoadContext cannot be released #59305

Open 7emotion opened 16 hours ago

7emotion commented 16 hours ago

Is there an existing issue for this?

Describe the bug

AdditionalAssemblies in Router.cs is loaded through AssemblyLoadContext, which will cause AssemblyLoadContext to be unable to be released

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

8

Anything else?

No response

javiercn commented 15 hours ago

@7emotion thanks for contacting us.

It's unclear what you are referring to, as you seem to be pointing to a C# file on the repo but not providing a link.

That said, this behavior is likely by design. The router doesn't support collectible assemblies, and you wouldn't be able to reclaim the WASM memory anyways as it can't shrink because of safety constraints in wasm code.

dotnet-policy-service[bot] commented 15 hours ago

Hi @7emotion. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.