-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Version
No response
Current Behavior
In the Graph.tsx component, the event listeners of the ECharts instance are not properly cleaned up when the component is unmounted. In particular, the window.resize event listener and the chart click event listener are not removed from the ECharts instance. This results in multiple listeners lingering in the memory after the component has been mounted and unmounted repeatedly, leading to the risk of memory leaks.
Current Behavior:
The window.resize event listener persists after the component is unmounted.
The event listeners bound to the ECharts instance are not removed from the instance.
Repeated component mounting and unmounting may lead to memory leaks and performance issues.
Expected Behavior
All event listeners should be cleaned up when the component is unmounted.
Global event listeners such as window.resize should be removed when the component is unmounted.
The ECharts instance should be destroyed only after all its listeners have been cleaned up.
Environment
- OS:
- Browser:Any additional comments?
No response