Skip to content

Conversation

@stephentoub
Copy link
Member

To avoid the iterator keeping alive references unnecessarily. If the consumer takes their time in processing the resulting array and nulls out values as they go, we don't want the list referenced by the enumerator still keeping those objects referenced.

Fixes #72577

To avoid the iterator keeping alive references unnecessarily.  If the consumer takes their time in processing the resulting array and nulls out values as they go, we don't want the list referenced by the enumerator still keeping those objects referenced.
@ghost ghost added the area-System.Linq label Jul 21, 2022
@ghost ghost assigned stephentoub Jul 21, 2022
@ghost
Copy link

ghost commented Jul 21, 2022

Tagging subscribers to this area: @dotnet/area-system-linq
See info in area-owners.md if you want to be subscribed.

Issue Details

To avoid the iterator keeping alive references unnecessarily. If the consumer takes their time in processing the resulting array and nulls out values as they go, we don't want the list referenced by the enumerator still keeping those objects referenced.

Fixes #72577

Author: stephentoub
Assignees: -
Labels:

area-System.Linq

Milestone: -

@stephentoub stephentoub merged commit 44be09d into dotnet:main Jul 22, 2022
@stephentoub stephentoub deleted the chunkref branch July 22, 2022 01:09
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Enumerable.Chunk can leak memory (.NET 7)

2 participants