Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Repeater memoization memory leak #1886

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Commits on Nov 19, 2024

  1. Fix Repeater memoization memory leak

    If the ConditionalWeakTable references itself, it will get leaked by
    .NET Core GC: dotnet/runtime#12255
    
    Fortunately, we don't really need the ConditinalWeakTable here:
    * Repeater should generally be a short-lived object, so
       strong references will also be collected reasonably soon
    * Between Load and PreRender, the viewmodels were pinned
       in the DataContext of all children and the children are in Children
       collection. Only after PreRender could those references be useful,
       but we can as well Clear the dictionary at that point.
    
    Co-authored-by: Adam Štěpánek <[email protected]>
    exyi and cafour committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    4bf8213 View commit details
    Browse the repository at this point in the history