Hi,
here is a little sample with a button which remove graphics and add 5000 new random graphics to the default graphiclayer .
we can see that the memory increase after each click and is never released even if we force garbage collection in the browser.
May be there is a mistake in my sample?
Is there a memory leak in the API?
Is there a workaround to adda and remove graphics periodically without memomry leak?
Browser used : Firefox (60.7.2ESR)
ArcGIS API for JavaScript : 4.11
Thanks in advance
Charles,
Try 4.12. I see that GC occurs after a couple of seconds automatically.
Robert,
thank for your response.
I tried with 4.12 and have the same result.
I launch the page.
Firefox take about 500Mb of memory.
After 50 creation/removing of the 5000 graphics the memory has grown up to 1Gb!
any other idea?
Charles,
I sorry I forgot the part about you using Firefox. I tested in Chrome and did not have that issue.
Robert,
I tested with Chrome 75 and reproduce that issue.
GC occurs but not all the memory is released.
After several add/remove of graphics, the memory increase ever and ever despite of the GC.
Thanks for your help.
Charles,
Then you need to contact esri tech support and open a bug for this.