dotnet / dotnet/dotnet-api-docs

ConditionalWeakTable does not release values if values reference the ConditionalWeaktable itself

Open
#3,273 3 comments 0 reactions 0 assignees View on GitHub
area-System.Runtime.CompilerServices doc-enhancement Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

This is a special case described at https://github.com/dotnet/corefx/issues/19765. The issue is if one of the values added to the `ConditionalWeakTable` references the table itself then one must call `Clear` (or use one of the other workarounds described on the issue) to ensure that there are no leaks.

This is not mentioned explicit on the docs but seems a special case that should be documented to save users from memory leaks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.