chengwubin commented on issue #4726: echarts内存泄露
URL: 
https://github.com/apache/incubator-echarts/issues/4726#issuecomment-458798119
 
 
   ```
   <!DOCTYPE html>
   <html lang="en">
   <head>
     <meta charset="UTF-8">
     <title>内存泄漏</title>
   </head>
   <body>
   <div id="test" style="width: 500px; height: 300px;"></div>
   <script 
src="https://cdn.bootcss.com/echarts/4.2.0-rc.2/echarts.min.js";></script>
   <script>
     var chart = null;
     function createChart() {
         chart = echarts.init(document.getElementById('test'));
         chart.setOption({
             xAxis: {
                 type: 'category',
                 data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
             },
             yAxis: {
                 type: 'value'
             },
             series: [{
                 data: [820, 932, 901, 934, 1290, 1330, 1320],
                 type: 'line'
             }]
         });
     }
   
     createChart();
     setInterval(function () {
         chart.clear();
         chart.dispose();
         createChart();
     }, 3000);
   </script>
   </body>
   </html>
   ```
   
   循环创建echarts
   
   版本信息:
   chrome:70.0.3538.110(正式版本) (32 位)
   echarts: 4.2.0-rc.2
   
   
![image](https://user-images.githubusercontent.com/18694507/51956252-eaca0500-2481-11e9-8005-4197a24230b8.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to