dengliming opened a new issue, #633:
URL: https://github.com/apache/shenyu-dashboard/issues/633

   ## Description
   `renderPieChart`/`renderLineChart` call `window.addEventListener("resize", 
...)` each time the chart data changes and never remove the listener; there is 
no `componentWillUnmount`, so the echarts instances are not disposed either.
   
   ## Location
   (Lines refer to `master @ 83969a5`.)
   - `src/routes/System/Instance/index.js:183-185,258-260`
   
   ## Impact
   Listeners accumulate on every namespace switch/refresh, and after navigating 
away each resize still calls `resize()` on orphaned chart instances (memory 
leak, wasted work, potential errors if the DOM node is gone).
   
   ## Suggested fix
   Store a single bound handler, add it once in `componentDidMount`, and remove 
it plus `dispose()` both charts in `componentWillUnmount`.
   
   ## Related existing
   None
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to