Skip to content

Conversation

@ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented Jan 6, 2025

I noticed this when looking at the SyntaxListPool and that it's _allocated debug info was not reducing back to zero length.

The early return codepaths in LanguageParser.ParseLocalDeclarationStatement are commonly hit, preventing the current code from releasing "variables" back into the pool. Changed to account for the early returns by utilizing the existing finally block similar to what is done for the "mods" pooled item.

I noticed this when looking at the SyntaxListPool and that it's allocated debug info was not reducing back to zero. The early return codepaths earlier in the method are commonly hit avoiding the current code from releasing "variables" back into the pool. Changed to account for the early returns by utilizing the existing finally block similar to what is done for the "mods" pooled item.
@ToddGrun ToddGrun requested a review from a team as a code owner January 6, 2025 15:55
@ghost ghost added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 6, 2025
@ToddGrun
Copy link
Contributor Author

ToddGrun commented Jan 7, 2025

@dotnet/roslyn-compiler for 2nd review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants