Skip to content

Conversation

CatchABus
Copy link
Contributor

@CatchABus CatchABus commented Jan 28, 2025

PR Checklist

What is the current behavior?

Right now, even if a view is unloaded, pseudo-class listeners will not be disposed.
At the same time, once view is loaded again, pseudo-class handlers will add new listeners resulting in a leak.
There's also another case of iOS button which can keep reference of their previous native view if removed and re-added to the view tree. That is also a defect caused by missing pseudo-class handlers cleanup.

What is the new behavior?

This PR ensures that pseudo-class handlers will follow the subscription cycle of adding and removing listeners.

@farfromrefug
Copy link
Collaborator

@CatchABus awesome fix!

@CatchABus CatchABus marked this pull request as ready for review January 28, 2025 08:35
@NathanWalker NathanWalker added this to the 8.9 milestone Jan 29, 2025
@NathanWalker NathanWalker merged commit e6beb1d into NativeScript:main Jan 29, 2025
0 of 3 checks passed
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.

3 participants