Skip to content

Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components (closes #20709 for 16/17) - #20723

Merged
AndyButland merged 6 commits into
mainfrom
v17/bugfix/handle-options-monitor-memory-leak
Nov 6, 2025
Merged

Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components (closes #20709 for 16/17)#20723
AndyButland merged 6 commits into
mainfrom
v17/bugfix/handle-options-monitor-memory-leak

Fix cache removal error.

8ad6b37
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed Nov 6, 2025 in 32s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce critical code health rules (1 file with Deep, Nested Complexity)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce critical code health rules Violations Code Health Impact
ValueEditorCache.cs 1 critical rule 10.00 → 9.39 Suppress

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Deep, Nested Complexity ValueEditorCache.cs: ClearCache

✅ Improving Code Health:

  • Overall Code Complexity ImageCropperPropertyValueEditor.cs

Annotations

Check notice on line 1 in src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.75 to 4.33, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 62 in src/Umbraco.Core/Cache/ValueEditorCache.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Deep, Nested Complexity

ClearCache has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.