echarts-bot[bot] commented on issue #19219:
URL: https://github.com/apache/echarts/issues/19219#issuecomment-1768004036

   @qingguoYan It seems you are not using English, I've helped translate the 
content automatically. To make your issue understood by more people and get 
helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] After echarts registers the map, it switches the route, generating 
memory
   
   **BODY**
   
   ### Version
   
   5.4.0
   
   ### Link to Minimal Reproduction
   
   
https://codesandbox.io/s/condescending-dubinsky-wlcpwt?file=/src/routers/echarts/index.js
   
   ### Steps to Reproduce
   
   1. Open the chrome console.
   2. In the memory option, route to home after manually clicking on garbage 
collection, take a heap snapshot.
   3. Switch to the echarts map route, click on garbage collection, and take a 
snapshot of the heap. (Switch to the echarts map route, click on garbage 
collection, and take a snapshot of the heap.)
   4. Switch to home routing again, click garbage collection, and take a heap 
snapshot. (Switch to home routing again, click garbage collection, and take a 
heap snapshot.)
   5. At this point, the ECHARTS component is destroyed, and echarts dispose, 
but the last snapshot generated on the home route still has data from the 
ECHARTS map, such as the JSON data that saw the China map in the string still 
in memory.
   (At this time, the echarts component is destroyed, and echarts disposes, but 
the last snapshot generated by the home route still contains the data of the 
echarts map. For example, the json data of the china map seen in the string is 
still in the memory)
   6. Incredibly, if multiple switches stay at home and memory steadily rises, 
this is a memory leak bug, and I tried to set the echarts instance to null, but 
still didn't solve it. (Incredibly, if the memory steadily increases after 
switching routes multiple times and staying at home, this is a memory leak bug. 
I tried setting the echarts instance to null, but it still did not solve the 
problem)
   
   ### Current Behavior
   
   echart register map, switch route to home, I think echarts should disapper 
from memory, but it is still in memory.
   and if I switch route some times and stop on the home route finally,Memory 
is growing slowly.
    
   
   ### Expected Behavior
   
   Echarts disappears from memory when I leave the ECHARTS route, and memory 
doesn't keep growing as I switch routes
   
   ### Environment
   
   ```markdown
   - OS: windows10
   - Browser:chrome 117.0.5938.150
   - Framework:react、echarts
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to