Skip to content

Conversation

@pictos
Copy link
Member

@pictos pictos commented Aug 21, 2025

This leak just happens if the Popup is singleton, the PropertyChanged and pageTapGestureRecognizer.Tappedevent subscriptions will hold a strong reference between those elements and cause a memory leak. Making sure to unhold from references will solve the leak.

PopupPageLayout will take longer to be released, not sure why but even with that there's no leak.

Fixes: #2855

pictos added 2 commits August 20, 2025 22:22
Updated the `PopupPage` constructor to use a separate `TapOutsideCommand` method for handling taps outside the popup, enhancing code readability and maintainability. The new method encapsulates the tap logic and ensures proper closure of the popup. Additionally, cleared gesture recognizers on navigation away to prevent unintended interactions.
Copilot AI review requested due to automatic review settings August 21, 2025 01:26
Copy link
Collaborator

@TheCodeTraveler TheCodeTraveler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Pedro!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) August 21, 2025 01:38
@TheCodeTraveler TheCodeTraveler merged commit 19b6e1f into main Aug 21, 2025
17 of 18 checks passed
@TheCodeTraveler TheCodeTraveler deleted the pj/fix-memory-leak-on-popup branch August 21, 2025 02:52
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants