-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.dotnet-fundamentals/svcin-prThis issue will be closed (fixed) by an active pull request.This issue will be closed (fixed) by an active pull request.
Description
I've recently hit a problem with (catastrophic) file handle leaks due to non unloaded assemblies. The docs are clear that unloading happens after all references into the loaded assemblies are collected - however my subclass of the AssemblyLoadContext was storing such references. It was disposed/out of scope, but it turns out the implementation keeps a strong GCHandle to the AssemblyLoadContext, so my references despite being out of scope are not collected.
Please can we add to the bulletpoints at the top of the page something along the lines of:
- The runtime keeps a strong GCHandle to the AssemblyLoadContext and will not be collected by the GC, so you will need to remove any references on the `AssemblyLoadContext` you have subclassed into loaded assemblies before the `Unload` will complete.
Thanks - related issue over here: dotnet/runtime#44679
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: f3283764-f15a-fa5f-5106-6f294c780f7b
- Version Independent ID: b03cedce-9074-9686-0b31-045b2b4c862d
- Content: How to use and debug assembly unloadability in .NET Core
- Content Source: docs/standard/assembly/unloadability.md
- Product: dotnet-fundamentals
- GitHub Login: @janvorli
- Microsoft Alias: janvorli
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.dotnet-fundamentals/svcin-prThis issue will be closed (fixed) by an active pull request.This issue will be closed (fixed) by an active pull request.
Type
Projects
Status
✅ Done