Possible memory leak in Xaml generator #11465
Labels
area/code-generation
Categorizes an issue or PR as relevant to code generation
area/performance 📈
Categorizes an issue or PR as relevant to performance
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
kind/bug
Something isn't working
triage/untriaged
Indicates an issue requires triaging or verification
Current behavior
uno/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGenerator.cs
Lines 23 to 25 in 772427d
uno/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/GenerationInfoManager.cs
Lines 21 to 23 in 772427d
uno/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/GenerationInfo.cs
Lines 10 to 12 in 772427d
uno/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/GenerationRunFileInfo.cs
Lines 9 to 11 in 772427d
XamlCodeGenerator
holds a reference toGenerationRunInfoManager
(this is alone is not good - generators should never have state)GenerationRunInfoManager
holds a reference to a list ofGenerationRunInfo
.GenerationRunInfo
holds a reference toConcurrentDictionary<string, GenerationRunFileInfo>
GenerationRunFileInfo
has a dictionary that keeps symbols alive, and thus keeps whole compilations alive.This looks like a memory leak. I don't think we should keep all old compilations alive this way.
The text was updated successfully, but these errors were encountered: