Skip to content

Prevent leaking event hooks in our MauiEventHandler #4159

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

Merged
merged 3 commits into from
May 2, 2025

Conversation

aritchie
Copy link
Collaborator

Collection views, Carousel Views, or any control that has reusable cells - has events that have us calling for hooks on controls where we may already have them (ie. Button with a CV cell). Due to events being multicast, we end adding a hook and never removing the previous one. To make this issue worse, because our SentryMauiEventBinder is singleton - it means controls and therefore their entire page - unable to cleanup.

This PR shouldn't require additional tests since logic hasn't changed.

@aritchie aritchie marked this pull request as ready for review May 2, 2025 15:52
@bruno-garcia bruno-garcia merged commit f92814d into main May 2, 2025
27 checks passed
@bruno-garcia bruno-garcia deleted the maui_mem_leak_fix branch May 2, 2025 20:27
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

Successfully merging this pull request may close these issues.

2 participants