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

Maybe dispatch the call to disconnecthandler on the UIThread? #128

Open
PureWeen opened this issue Jul 2, 2024 · 0 comments
Open

Maybe dispatch the call to disconnecthandler on the UIThread? #128

PureWeen opened this issue Jul 2, 2024 · 0 comments

Comments

@PureWeen
Copy link
Contributor

PureWeen commented Jul 2, 2024

Description

private void HandleChildRemoved(object sender, ElementEventArgs e)
{
var view = e.Element;
DisposeModelAndChildrenHandlers((VisualElement)view);
}

We should have a lot more of the memory leak scenarios resolved, so, I would be curious to see if you can remove this.
If you can't remove it, I would be curious to know if you have scenarios we can look at.

All that being said, I think if you dispatch the disconnecthandler call so that MAUI code can resolve first, that's going to eliminate a few edge cases that might cause crashes.

Example: dotnet/maui#23408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant