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/memory leak #7278

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

vuhoanglam
Copy link

@vuhoanglam vuhoanglam commented Feb 19, 2025

###Defect Fixes
#5856 #5629

fix(Tooltip): Resolve memory leaks and improve event handling

  • Implement WeakMap for centralized event handler management
  • Add proper cleanup for all event listeners in unmounted hook
  • Clear timers and intervals when component is destroyed
  • Fix tooltip mouseleave event handler cleanup
  • Improve scroll handler lifecycle management
  • Add data() state management for better reactivity
  • Optimize tooltip removal logic
  • Enhance performance with WeakMap for handler storage

This commit addresses multiple memory leak issues in the Tooltip component
by ensuring proper cleanup of event listeners, timers, and DOM references.
The changes improve component lifecycle management and prevent memory
accumulation in long-running applications.

- Implement WeakMap for centralized event handler management
- Add proper cleanup for all event listeners in unmounted hook
- Clear timers and intervals when component is destroyed
- Fix tooltip mouseleave event handler cleanup
- Improve scroll handler lifecycle management
- Add data() state management for better reactivity
- Optimize tooltip removal logic
- Enhance performance with WeakMap for handler storage

This commit addresses multiple memory leak issues in the Tooltip component
by ensuring proper cleanup of event listeners, timers, and DOM references.
The changes improve component lifecycle management and prevent memory
accumulation in long-running applications.

BREAKING CHANGE: The internal event handling structure has been refactored. 
Custom implementations extending the Tooltip component may need updates.
Copy link

vercel bot commented Feb 19, 2025

Deployment failed with the following error:

Creating the Deployment Timed Out.

@tugcekucukoglu tugcekucukoglu added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants